Task #52300 - added.err

back to task #52300
download
Error: GCC_ANALYZER_WARNING:
libsolv-0.7.32/ext/repo_apk.c:262:13: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘fd’
libsolv-0.7.32/ext/repo_apk.c:686:1: enter_function: entry to ‘repo_add_apk_repo’
libsolv-0.7.32/ext/repo_apk.c:698:6: branch_false: following ‘false’ branch...
libsolv-0.7.32/ext/repo_apk.c:700:3: branch_false: ...to here
libsolv-0.7.32/ext/repo_apk.c:702:6: branch_true: following ‘true’ branch...
libsolv-0.7.32/ext/repo_apk.c:704:10: branch_true: ...to here
libsolv-0.7.32/ext/repo_apk.c:704:9: branch_false: following ‘false’ branch...
libsolv-0.7.32/ext/repo_apk.c:706:10: branch_false: ...to here
libsolv-0.7.32/ext/repo_apk.c:706:9: branch_true: following ‘true’ branch...
libsolv-0.7.32/ext/repo_apk.c:707:15: call_function: calling ‘add_apkv3_idx’ from ‘repo_add_apk_repo’
#  260|   	r = fread(comp, 2, 1, fp) == 1 ? 2 : feof(fp) ? 0 : -1;
#  261|         else
#  262|-> 	r = read(fd, comp, 2);
#  263|         if (r != 2)
#  264|   	return open_apkv3_error(pool, fd, fn, "compression header read error");

Error: GCC_ANALYZER_WARNING (CWE-688):
libsolv-0.7.32/ext/repo_apk.c:293:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cfp’ where non-null expected
libsolv-0.7.32/ext/repo_apk.c:686:1: enter_function: entry to ‘repo_add_apk_repo’
libsolv-0.7.32/ext/repo_apk.c:698:6: branch_false: following ‘false’ branch...
libsolv-0.7.32/ext/repo_apk.c:700:3: branch_false: ...to here
libsolv-0.7.32/ext/repo_apk.c:702:6: branch_true: following ‘true’ branch...
libsolv-0.7.32/ext/repo_apk.c:704:10: branch_true: ...to here
libsolv-0.7.32/ext/repo_apk.c:704:9: branch_false: following ‘false’ branch...
libsolv-0.7.32/ext/repo_apk.c:706:10: branch_false: ...to here
libsolv-0.7.32/ext/repo_apk.c:706:9: branch_true: following ‘true’ branch...
libsolv-0.7.32/ext/repo_apk.c:707:15: call_function: calling ‘add_apkv3_idx’ from ‘repo_add_apk_repo’
#  291|     if (adbchar != '.')
#  292|       {
#  293|->       if (fread(buf, 4, 1, cfp) != 1 || buf[0] != 'A' || buf[1] != 'D' || buf[2] != 'B' || buf[3] != '.')
#  294|   	{
#  295|   	  pool_error(pool, -1, "%s: not an apkv3 file", fn);

Error: CPPCHECK_WARNING (CWE-758):
libsolv-0.7.32/src/repodata.c:2201: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 2199|     di->solvid = solvid;
# 2200|     if (solvid)
# 2201|->     di->flags |= SEARCH_THISSOLVID;
# 2202|     di->state = di_enterrepo;
# 2203|   }