Task #132740 - fixed.err
back to task #132740download
Error: COMPILER_WARNING:
rpm-6.0.1/lib/fsm.cc: scope_hint: In function ‘void removeSBITS(int, const char*)’
rpm-6.0.1/lib/fsm.cc:478:13: warning[-Wunused-but-set-variable=]: variable ‘rc’ set but not used
# 478 | int rc = 0;
# | ^~
# 476| if (fstatat(dirfd, path, &stb, flags) == 0 && S_ISREG(stb.st_mode)) {
# 477| /* XXX TODO: actually check for the rc, but what to do there? */
# 478|-> int rc = 0;
# 479| /* We now know it's not a link so no need to worry about following */
# 480| if ((stb.st_mode & 06000) != 0) {
Error: CPPCHECK_WARNING (CWE-476):
rpm-6.0.1/lib/tagexts.cc:907: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: e
# 905| if (!headerGet(h, RPMTAG_EPOCH, td, HEADERGET_ALLOC)) {
# 906| uint32_t *e = (uint32_t *)malloc(sizeof(*e));
# 907|-> *e = 0;
# 908| td->data = e;
# 909| td->type = RPM_INT32_TYPE;
Error: CPPCHECK_WARNING (CWE-476):
rpm-6.0.1/tools/rpmdump.cc:137: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: blob
# 135|
# 136| blob = (uint32_t *)malloc(sizeof(numEntries) + sizeof(numBytes) + headerLen);
# 137|-> blob[0] = htonl(numEntries);
# 138| blob[1] = htonl(numBytes);
# 139|
Error: CPPCHECK_WARNING (CWE-476):
rpm-6.0.1/tools/rpmdump.cc:138: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: blob
# 136| blob = (uint32_t *)malloc(sizeof(numEntries) + sizeof(numBytes) + headerLen);
# 137| blob[0] = htonl(numEntries);
# 138|-> blob[1] = htonl(numBytes);
# 139|
# 140| pe = (struct entryInfo *) &(blob[2]);
Error: CPPCHECK_WARNING (CWE-682):
rpm-6.0.1/tools/rpmdump.cc:148: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 146|
# 147|
# 148|-> if (read(fd, blob+2, headerLen) != headerLen) {
# 149| fprintf(stderr, "reading %d bytes of header fail\n", headerLen);
# 150| goto exit;