Task #772 - libfontenc-1.1.8-1.fc41/scan-results.err
back to task #772download
Error: CPPCHECK_WARNING: libfontenc-1.1.8-build/libfontenc-1.1.8/src/encparse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libfontenc-1.1.8-build/libfontenc-1.1.8/src/encparse.c:830:22: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 828| # 829| free(encoding->name); # 830|-> for (mapping = encoding->mappings; mapping; mapping = nextmap) { # 831| free(mapping->client_data); # 832| nextmap = mapping->next; Error: CPPCHECK_WARNING (CWE-457): libfontenc-1.1.8-build/libfontenc-1.1.8/src/encparse.c:880: warning[uninitvar]: Uninitialized variable: dir # 878| *lastslash = '\0'; # 879| # 880|-> if (buf && strlen(dir) + 14 < MAXFONTFILENAMELEN) { # 881| snprintf(buf, MAXFONTFILENAMELEN, "%s%s", dir, "encodings.dir"); # 882| } Error: COMPILER_WARNING: libfontenc-1.1.8-build/libfontenc-1.1.8/src/encparse.c: scope_hint: In function 'FontEncReallyLoad' libfontenc-1.1.8-build/libfontenc-1.1.8/src/encparse.c:881:46: warning[-Wformat-truncation=]: '%s' directive output may be truncated writing 13 bytes into a region of size between 1 and 1024 # 881 | snprintf(buf, MAXFONTFILENAMELEN, "%s%s", dir, "encodings.dir"); # | ^~ ~~~~~~~~~~~~~~~ /usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output between 14 and 1037 bytes into a destination of size 1024 # 68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 69 | __glibc_objsize (__s), __fmt, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 70 | __va_arg_pack ()); # | ~~~~~~~~~~~~~~~~~ # 879| # 880| if (buf && strlen(dir) + 14 < MAXFONTFILENAMELEN) { # 881|-> snprintf(buf, MAXFONTFILENAMELEN, "%s%s", dir, "encodings.dir"); # 882| } # 883| } Error: COMPILER_WARNING (CWE-134): libfontenc-1.1.8-build/libfontenc-1.1.8/src/encparse.c: scope_hint: In function 'FontEncReallyReallyLoad' libfontenc-1.1.8-build/libfontenc-1.1.8/src/encparse.c:916:30: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked # 916 | count = fscanf(file, format, encoding_name, file_name); # | ^~~~~~ # 914| } # 915| for (;;) { # 916|-> count = fscanf(file, format, encoding_name, file_name); # 917| if (count == EOF) # 918| break; Error: CPPCHECK_WARNING: libfontenc-1.1.8-build/libfontenc-1.1.8/src/fontenc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-787): libfontenc-1.1.8-build/libfontenc-1.1.8/src/fontenc.c: scope_hint: In function 'koi8_e_to_unicode' libfontenc-1.1.8-build/libfontenc-1.1.8/src/fontenc.c:496:28: warning[-Wanalyzer-out-of-bounds]: buffer over-read libfontenc-1.1.8-build/libfontenc-1.1.8/src/fontenc.c:496:28: note: valid subscripts for 'koi8_e_A0_BF' are '[0]' to '[31]' # └─────────────────┘ # ^ # 494| return koicode; # 495| else if (koicode < 0xC0) # 496|-> return koi8_e_A0_BF[koicode - 0xA0]; # 497| else # 498| return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); Error: CLANG_WARNING: libfontenc-1.1.8-build/libfontenc-1.1.8/src/fontenc.c:922:18: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'unsigned int', which is incompatible with sizeof operand type 'int' # 920| # 921| if (map[s] == NULL) { # 922|-> map[s] = calloc(FONTENC_SEGMENT_SIZE, sizeof(int)); # 923| if (map[s] == NULL) # 924| return FALSE; Error: CLANG_WARNING: libfontenc-1.1.8-build/libfontenc-1.1.8/src/fontenc.c:942:11: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'unsigned int *', which is incompatible with sizeof operand type 'int *' # 940| goto bail; # 941| # 942|-> map = calloc(FONTENC_SEGMENTS, sizeof(int *)); # 943| if (map == NULL) # 944| goto bail;