Task #91385 - libbytesize-2.11-104.fc43/scan-results.err
back to task #91385download
Error: CPPCHECK_WARNING (CWE-476):
libbytesize-2.11/src/bs_size.c:112: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: size
# 110| static void bs_size_init (BSSize size) {
# 111| /* let's start with 64 bits of space */
# 112|-> mpz_init2 (size->bytes, (mp_bitcnt_t) 64);
# 113| }
# 114|
Error: COMPILER_WARNING (CWE-704):
libbytesize-2.11/src/bs_size.c: scope_hint: In function 'replace_str_with_str'
libbytesize-2.11/src/bs_size.c:184:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 184 | pos = strstr (str, orig);
# | ^
# 182| char *dest = NULL;
# 183|
# 184|-> pos = strstr (str, orig);
# 185| if (!pos)
# 186| /* nothing to do, just return a copy */
Error: COMPILER_WARNING (CWE-704):
libbytesize-2.11/src/bs_size.c:184:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 182| char *dest = NULL;
# 183|
# 184|-> pos = strstr (str, orig);
# 185| if (!pos)
# 186| /* nothing to do, just return a copy */
Error: GCC_ANALYZER_WARNING (CWE-457):
libbytesize-2.11/src/bs_size.c:498:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
libbytesize-2.11/src/bs_size.c:437:8: enter_function: entry to 'bs_size_new_from_str'
libbytesize-2.11/src/bs_size.c:470:8: branch_false: following 'false' branch...
libbytesize-2.11/src/bs_size.c:492:20: branch_false: ...to here
libbytesize-2.11/src/bs_size.c:492:20: call_function: calling 'replace_char_with_str' from 'bs_size_new_from_str'
libbytesize-2.11/src/bs_size.c:492:20: return_function: returning to 'bs_size_new_from_str' from 'replace_char_with_str'
libbytesize-2.11/src/bs_size.c:493:8: branch_false: following 'false' branch...
libbytesize-2.11/src/bs_size.c:498:15: branch_false: ...to here
libbytesize-2.11/src/bs_size.c:498:15: danger: use of uninitialized value '*<unknown>' here
# 496| return NULL;
# 497| }
# 498|-> str_len = strlen (loc_size_str);
# 499|
# 500| match_data = pcre2_match_data_create_from_pattern (regex, NULL);