libfontenc-1.1.8-1.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
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: [#def2]
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): [#def3]
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: [#def4]
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): [#def5]
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: [#def6]
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): [#def7]
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: [#def8]
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: [#def9]
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;
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-146.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | libfontenc-1.1.8-1.fc41 |
store-results-to | /tmp/tmp1mm2qy44/libfontenc-1.1.8-1.fc41.tar.xz |
time-created | 2024-07-03 14:46:12 |
time-finished | 2024-07-03 14:47:07 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp1mm2qy44/libfontenc-1.1.8-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp1mm2qy44/libfontenc-1.1.8-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |