Coverity-updates archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
New Defects reported by Coverity Scan for NetBSD-amd64-user
Hi,
Please find the latest report on new defect(s) introduced to NetBSD-amd64-user found with Coverity Scan.
3 new defect(s) introduced to NetBSD-amd64-user found with Coverity Scan.
4 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 275186: Integer handling issues (NEGATIVE_RETURNS)
________________________________________________________________________________________________________
*** CID 275186: Integer handling issues (NEGATIVE_RETURNS)
/crypto/external/bsd/heimdal/dist/kdc/kx509.c: 109 in calculate_reply_hash()
103 HMAC_CTX ctx;
104
105 HMAC_CTX_init(&ctx);
106
107 HMAC_Init_ex(&ctx, key->keyvalue.data, key->keyvalue.length,
108 EVP_sha1(), NULL);
>>> CID 275186: Integer handling issues (NEGATIVE_RETURNS)
>>> "EVP_MD_size(ctx.md)" is passed to a parameter that cannot be negative.
109 ret = krb5_data_alloc(rep->hash, HMAC_size(&ctx));
110 if (ret) {
111 HMAC_CTX_cleanup(&ctx);
112 krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
113 return ENOMEM;
114 }
** CID 975551: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/sys/dev/usb/umass.c: 884 in umass_clear_endpoint_stall()
________________________________________________________________________________________________________
*** CID 975551: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/sys/dev/usb/umass.c: 884 in umass_clear_endpoint_stall()
878
879 usbd_clear_endpoint_toggle(sc->sc_pipe[endpt]);
880
881 sc->sc_req.bmRequestType = UT_WRITE_ENDPOINT;
882 sc->sc_req.bRequest = UR_CLEAR_FEATURE;
883 USETW(sc->sc_req.wValue, UF_ENDPOINT_HALT);
>>> CID 975551: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
>>> "sc->sc_epaddr[endpt] >> 8" is 0 regardless of the values of its operands. This occurs as the operand of assignment.
884 USETW(sc->sc_req.wIndex, sc->sc_epaddr[endpt]);
885 USETW(sc->sc_req.wLength, 0);
886 umass_setup_ctrl_transfer(sc, &sc->sc_req, NULL, 0, 0, xfer);
887 }
888
889 #if 0
** CID 1307747: Code maintainability issues (UNUSED_VALUE)
/usr.bin/xinstall/xinstall.c: 1006 in run()
________________________________________________________________________________________________________
*** CID 1307747: Code maintainability issues (UNUSED_VALUE)
/usr.bin/xinstall/xinstall.c: 1006 in run()
1000 if (*command == '/')
1001 rv = posix_spawn(NULL, command, NULL, NULL, args, NULL);
1002 else
1003 rv = posix_spawnp(NULL, command, NULL, NULL, args, NULL);
1004 if (rv != 0) {
1005 warnc(rv, "Cannot execute %s", command);
>>> CID 1307747: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value "-1" to "rv" here, but that stored value is overwritten before it can be used.
1006 rv = -1;
1007 }
1008 #else
1009 switch (vfork()) {
1010 case -1:
1011 rv = errno;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/1449?tab=overview
To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click https://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782 .
Home |
Main Index |
Thread Index |
Old Index