Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/XDefaultOMIF.c:66: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:447:20: warning[-Wanalyzer-malloc-leak]: leak of '*font_set.font_name' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/XDefaultOMIF.c:365:13: note: in expansion of macro 'Xfree' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/XDefaultOMIF.c:365:13: note: in expansion of macro 'Xfree' # 445| #endif # 446| # 447|-> #define Xfree(ptr) free((ptr)) # 448| # 449| /* Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:447:20: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:227:5: note: in expansion of macro 'Xfree' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:172:40: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:172:40: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:174:40: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:227:5: note: in expansion of macro 'Xfree' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:227:5: note: in expansion of macro 'Xfree' # 445| #endif # 446| # 447|-> #define Xfree(ptr) free((ptr)) # 448| # 449| /* Error: COMPILER_WARNING: [#def3] libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:447:20: warning[-Wuse-after-free]: pointer may be used after 'reallocarray' # 447 | #define Xfree(ptr) free((ptr)) # | ^~~~~~~~~~~ libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBlibint.h:32: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBMAlloc.c:36: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/reallocarray.h:39:5: note: call to 'reallocarray' here # 39 | reallocarray((ptr), ((n) == 0 ? 1 : (n)), size) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 445| #endif # 446| # 447|-> #define Xfree(ptr) free((ptr)) # 448| # 449| /* Error: GCC_ANALYZER_WARNING (CWE-131): [#def4] libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:457:24: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1461:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1452:15: note: in expansion of macro 'Xcalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1461:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1461:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1461:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1461:17: note: in expansion of macro 'Xmalloc' # 455| #if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__) # 456| # 457|-> # define Xmalloc(size) malloc((size_t)((size) == 0 ? 1 : (size))) # 458| # define Xrealloc(ptr, size) realloc((ptr), (size_t)((size) == 0 ? 1 : (size))) # 459| # define Xcalloc(nelem, elsize) calloc((size_t)((nelem) == 0 ? 1 : (nelem)), (size_t)(elsize)) Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] libX11-1.8.10-build/libX11-1.8.10/src/Region.c: scope_hint: In function 'miSubtractNonO1' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:117:14: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:458:55: note: in definition of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' # 115| BoxPtr tmpRect = Xrealloc ((firstrect), \ # 116| (2 * (sizeof(BOX)) * ((reg)->size))); \ # 117|-> if (tmpRect == NULL) \ # 118| return(0);\ # 119| (firstrect) = tmpRect; \ Error: GCC_ANALYZER_WARNING (CWE-476): [#def6] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imCallbk.c: scope_hint: In function '_read_text_from_packet' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imCallbk.c:531:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*text.feedback + (long unsigned int)j * 8' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imCallbk.c:38: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imCallbk.c:460:24: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imCallbk.c:528:26: note: in expansion of macro 'Xmalloc' # 529| j = 0; # 530| while (i > 0) { # 531|-> text->feedback[j] = (XIMFeedback)*(CARD32*)buf; # 532| buf += sz_CARD32; # 533| i -= sz_CARD32; Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c: scope_hint: In function '_XimProtoCreateIC' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1446:16: warning[-Wanalyzer-malloc-leak]: leak of 'buf' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:55: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1452:15: note: in expansion of macro 'Xcalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1523:25: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1529:25: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1529:25: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1529:25: note: in expansion of macro 'Xrealloc' # 1444| #else # 1445| if (!IS_SERVER_CONNECTED(im)) # 1446|-> return (XIC)NULL; # 1447| #endif /* XIM_CONNECTABLE */ # 1448| Error: GCC_ANALYZER_WARNING (CWE-131): [#def8] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1499:5: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1452:15: note: in expansion of macro 'Xcalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1489:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1489:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIc.c:1489:17: note: in expansion of macro 'Xmalloc' # 1497| ic->private.proto.ic_num_resources, input_style); # 1498| # 1499|-> _XimSetICMode(ic->private.proto.ic_inner_resources, # 1500| ic->private.proto.ic_num_inner_resources, input_style); # 1501| Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c: scope_hint: In function '_XimProtoSetIMValues.part.0' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:1345:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg' # 1343| if (buf != tmp_buf) # 1344| Xfree(buf); # 1345|-> return arg->name; # 1346| } # 1347| _XimFlush(im); Error: GCC_ANALYZER_WARNING (CWE-476): [#def10] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:1365:27: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:58: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:1364:17: note: in expansion of macro 'Xfree' # 1363| if(ret_code != XIM_TRUE) { # 1364| Xfree(preply); # 1365|-> return arg->name; # 1366| } # 1367| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def11] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:1369:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg' # 1367| } # 1368| } else # 1369|-> return arg->name; # 1370| buf_s = (CARD16 *)((char *)preply + XIM_HEADER_SIZE); # 1371| if (*((CARD8 *)preply) == XIM_ERROR) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def12] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:1371:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'preply' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:1360:22: note: in expansion of macro 'Xmalloc' # 1369| return arg->name; # 1370| buf_s = (CARD16 *)((char *)preply + XIM_HEADER_SIZE); # 1371|-> if (*((CARD8 *)preply) == XIM_ERROR) { # 1372| _XimProcError(im, 0, (XPointer)&buf_s[3]); # 1373| if(reply != preply) Error: GCC_ANALYZER_WARNING (CWE-457): [#def13] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:1371:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*(CARD8 *)preply' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:1360:22: note: in expansion of macro 'Xmalloc' # 1369| return arg->name; # 1370| buf_s = (CARD16 *)((char *)preply + XIM_HEADER_SIZE); # 1371|-> if (*((CARD8 *)preply) == XIM_ERROR) { # 1372| _XimProcError(im, 0, (XPointer)&buf_s[3]); # 1373| if(reply != preply) Error: GCC_ANALYZER_WARNING (CWE-476): [#def14] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imDefIm.c:1375:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg' # 1373| if(reply != preply) # 1374| Xfree(preply); # 1375|-> return arg->name; # 1376| } # 1377| if(reply != preply) Error: GCC_ANALYZER_WARNING (CWE-122): [#def15] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c: scope_hint: In function '_XimSetExtensionList' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:325:16: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:33: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:439:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:439:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:439:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:325:16: note: write of 1 byte to beyond the end of the region # 323| for (i = 0; i < n; i++) { # 324| len = extensions[i].name_len; # 325|-> buf[0] = (BYTE)len; # 326| (void)strcpy((char *)&buf[1], extensions[i].name); # 327| len += sizeof(BYTE); Error: GCC_ANALYZER_WARNING (CWE-122): [#def16] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c: scope_hint: In function '_XimExtension' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:443:14: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:439:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:439:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:439:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:443:14: note: write of 2 bytes to beyond the end of the region # 441| buf_s = (CARD16 *)&buf[XIM_HEADER_SIZE]; # 442| # 443|-> buf_s[0] = im->private.proto.imid; /* imid */ # 444| buf_s[1] = len; /* length of Extensions */ # 445| _XimSetExtensionList((CARD8 *)&buf_s[2]); Error: GCC_ANALYZER_WARNING (CWE-122): [#def17] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:444:14: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:439:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:439:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:439:17: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imExten.c:444:14: note: write of 2 bytes to beyond the end of the region # 442| # 443| buf_s[0] = im->private.proto.imid; /* imid */ # 444|-> buf_s[1] = len; /* length of Extensions */ # 445| _XimSetExtensionList((CARD8 *)&buf_s[2]); # 446| /* extensions supported */ Error: GCC_ANALYZER_WARNING (CWE-126): [#def18] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:322:12: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c: scope_hint: In function '_XimCachedFileName' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:43: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:531:30: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:531:30: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:531:30: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:531:30: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:322:12: note: read of 1 byte from after the end of the region # 320| { # 321| unsigned int hash = 0; # 322|-> while (*name) # 323| hash = hash * XIM_HASH_PRIME_1 + *(unsigned const char *)name++; # 324| return hash % XIM_HASH_PRIME_2; Error: GCC_ANALYZER_WARNING (CWE-688): [#def19] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c: scope_hint: In function '_XimCachedFileName' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:343:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'dir' where non-null expected libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:53: included_from: Included from here. /usr/include/sys/stat.h:205:12: note: argument 1 of 'stat' must be non-null # 341| /* fprintf (stderr, "XimCachedFileName for dir %s name %s intname %s encoding %s uid %d\n", dir, name, intname, encoding, uid); */ # 342| if (stat (name, &st_name) == -1 || ! S_ISREG (st_name.st_mode) # 343|-> || stat (dir, &st) == -1 || ! S_ISDIR (st.st_mode) || st.st_uid != uid # 344| || (st.st_mode & 0022) != 0000) { # 345| *res = NULL; Error: GCC_ANALYZER_WARNING (CWE-688): [#def20] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:354:8: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'cachename' where non-null expected libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:351:13: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:457:59: note: in definition of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:351:13: note: in expansion of macro 'Xmalloc' <built-in>: note: argument 1 of '__builtin_sprintf' must be non-null # 352| # 353| if (len == 0 || dir [len-1] != '/') # 354|-> sprintf (*res, "%s/%c%d_%03x_%08x_%08x", dir, _XimGetMyEndian(), # 355| XIM_CACHE_VERSION, (unsigned int)sizeof (DefTree), hash, hash2); # 356| else Error: GCC_ANALYZER_WARNING (CWE-688): [#def21] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:357:8: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'cachename' where non-null expected libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:351:13: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:457:59: note: in definition of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:351:13: note: in expansion of macro 'Xmalloc' <built-in>: note: argument 1 of '__builtin_sprintf' must be non-null # 355| XIM_CACHE_VERSION, (unsigned int)sizeof (DefTree), hash, hash2); # 356| else # 357|-> sprintf (*res, "%s%c%d_%03x_%08x_%08x", dir, _XimGetMyEndian(), # 358| XIM_CACHE_VERSION, (unsigned int)sizeof (DefTree), hash, hash2); # 359| Error: GCC_ANALYZER_WARNING (CWE-476): [#def22] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c: scope_hint: In function '_XimWriteCachedDefaultTree' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:465:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'm' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:351:13: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:457:59: note: in definition of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:49: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcIm.c:464:9: note: in expansion of macro 'Xcalloc' # 463| # 464| m = Xcalloc (1, msize); # 465|-> m->id = XIM_CACHE_MAGIC; # 466| m->version = XIM_CACHE_VERSION; # 467| m->top = im->private.local.top; Error: COMPILER_WARNING: [#def23] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcPrs.c:681:32: warning[-Wuse-after-free]: pointer 'old_178' may be used after 'realloc' # 681 | if (old && top >= (DTIndex *) old && top < (DTIndex *) &old[oldsize]) # | ~~~~^~~~~~~~~~~~~~~~~~ libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcPrs.c:39: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:458:30: note: call to 'realloc' here # 458 | # define Xrealloc(ptr, size) realloc((ptr), (size_t)((size) == 0 ? 1 : (size))) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 679| /* Re-derive top after realloc() to avoid undefined behaviour # 680| (and crashes on architectures that track pointer bounds). */ # 681|-> if (old && top >= (DTIndex *) old && top < (DTIndex *) &old[oldsize]) # 682| top = (DTIndex *) (((char *)new) + (((char *)top)-(char *)old)); # 683| } Error: COMPILER_WARNING: [#def24] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcPrs.c:681:72: warning[-Wuse-after-free]: pointer 'old_178' may be used after 'realloc' # 681 | if (old && top >= (DTIndex *) old && top < (DTIndex *) &old[oldsize]) # | ^~~~~~~~~~~~~ libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:458:30: note: call to 'realloc' here # 458 | # define Xrealloc(ptr, size) realloc((ptr), (size_t)((size) == 0 ? 1 : (size))) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 679| /* Re-derive top after realloc() to avoid undefined behaviour # 680| (and crashes on architectures that track pointer bounds). */ # 681|-> if (old && top >= (DTIndex *) old && top < (DTIndex *) &old[oldsize]) # 682| top = (DTIndex *) (((char *)new) + (((char *)top)-(char *)old)); # 683| } Error: COMPILER_WARNING: [#def25] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imLcPrs.c:682:70: warning[-Wuse-after-free]: pointer 'old_178' may be used after 'realloc' # 682 | top = (DTIndex *) (((char *)new) + (((char *)top)-(char *)old)); # | ~~~~~~~~~~~~~~^~~~~~~~~~~~~ libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:458:30: note: call to 'realloc' here # 458 | # define Xrealloc(ptr, size) realloc((ptr), (size_t)((size) == 0 ? 1 : (size))) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 680| (and crashes on architectures that track pointer bounds). */ # 681| if (old && top >= (DTIndex *) old && top < (DTIndex *) &old[oldsize]) # 682|-> top = (DTIndex *) (((char *)new) + (((char *)top)-(char *)old)); # 683| } # 684| p = &b->tree[b->treeused]; Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c: scope_hint: In function '_XimThaiCreateIC' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:163:17: warning[-Wanalyzer-malloc-leak]: leak of 'tree' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:41: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:170:49: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:172:40: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/modules/im/ximcp/imThaiIc.c:227:5: note: in expansion of macro 'Xfree' # 161| # 162| if((ic = Xcalloc(1, sizeof(XicRec))) == (Xic)NULL) { # 163|-> return ((XIC)NULL); # 164| } # 165| Error: GCC_ANALYZER_WARNING (CWE-476): [#def27] libX11-1.8.10-build/libX11-1.8.10/modules/lc/gen/lcGenConv.c: scope_hint: In function 'gi_to_wc' libX11-1.8.10-build/libX11-1.8.10/modules/lc/gen/lcGenConv.c:241:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'codeset' # 239| { # 240| unsigned char mask = 0; # 241|-> unsigned long wc_encoding = codeset->wc_encoding; # 242| int length = codeset->length; # 243| unsigned long wc_shift_bits = XLC_GENERIC(lcd, wc_shift_bits); Error: GCC_ANALYZER_WARNING (CWE-476): [#def28] libX11-1.8.10-build/libX11-1.8.10/modules/lc/gen/lcGenConv.c:925:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'inbufptr' libX11-1.8.10-build/libX11-1.8.10/modules/lc/gen/lcGenConv.c:2359:20: note: in expansion of macro 'Xmalloc' # 923| while (*from_left && *to_left) { # 924| # 925|-> wc = *inbufptr++; # 926| (*from_left)--; # 927| Error: GCC_ANALYZER_WARNING (CWE-457): [#def29] libX11-1.8.10-build/libX11-1.8.10/modules/lc/gen/lcGenConv.c: scope_hint: In function 'wcstombs_org' libX11-1.8.10-build/libX11-1.8.10/modules/lc/gen/lcGenConv.c:925:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*inbufptr' libX11-1.8.10-build/libX11-1.8.10/modules/lc/gen/lcGenConv.c:52: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/modules/lc/gen/lcGenConv.c:2359:20: note: in expansion of macro 'Xmalloc' # 923| while (*from_left && *to_left) { # 924| # 925|-> wc = *inbufptr++; # 926| (*from_left)--; # 927| Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] libX11-1.8.10-build/libX11-1.8.10/modules/om/generic/omGeneric.c: scope_hint: In function 'init_fontset' libX11-1.8.10-build/libX11-1.8.10/modules/om/generic/omGeneric.c:138:42: warning[-Wanalyzer-malloc-leak]: leak of 'font_set' libX11-1.8.10-build/libX11-1.8.10/modules/om/generic/omGeneric.c:53: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/modules/om/generic/omGeneric.c:130:16: note: in expansion of macro 'Xcalloc' # 136| gen->font_set = font_set; # 137| # 138|-> for ( ; count-- > 0; data++, font_set++) { # 139| font_set->charset_count = data->charset_count; # 140| font_set->charset_list = data->charset_list; Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] libX11-1.8.10-build/libX11-1.8.10/modules/om/generic/omGeneric.c:177:23: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' libX11-1.8.10-build/libX11-1.8.10/modules/om/generic/omGeneric.c:78:10: note: in expansion of macro 'Xcalloc' # 175| Xfree(font_set); # 176| gen->font_set = (FontSet) NULL; # 177|-> gen->font_set_num = 0; # 178| return False; # 179| } Error: COMPILER_WARNING: [#def32] libX11-1.8.10-build/libX11-1.8.10/src/ErrDes.c: scope_hint: In function 'XGetErrorDatabaseText.part.0' libX11-1.8.10-build/libX11-1.8.10/src/ErrDes.c:194:38: warning[-Wformat-truncation=]: '%s' directive output may be truncated writing up to 8190 bytes into a region of size between 1 and 8191 # 194 | snprintf(tptr, tlen, "%s.%s", name, type); # | ^~ /usr/include/bits/stdio2.h:68:10: note: '__snprintf_chk' output between 2 and 16382 bytes into a destination of size 8192 # 68 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 69 | __glibc_objsize (__s), __fmt, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 70 | __va_arg_pack ()); # | ~~~~~~~~~~~~~~~~~ # 192| tptr = Xmalloc (tlen); # 193| if (tptr) { # 194|-> snprintf(tptr, tlen, "%s.%s", name, type); # 195| XrmGetResource(db, tptr, "ErrorType.ErrorNumber", # 196| &type_str, &result); Error: GCC_ANALYZER_WARNING (CWE-476): [#def33] libX11-1.8.10-build/libX11-1.8.10/src/FontInfo.c: scope_hint: In function 'XListFontsWithInfo' libX11-1.8.10-build/libX11-1.8.10/src/FontInfo.c:121:33: warning[-Wanalyzer-null-dereference]: dereference of NULL 'fs' # 119| fs = &finfo[i]; # 120| # 121|-> fs->ext_data = NULL; # 122| fs->per_char = NULL; # 123| fs->fid = None; Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] libX11-1.8.10-build/libX11-1.8.10/src/GetAtomNm.c: scope_hint: In function '_XGetAtomNameHandler' libX11-1.8.10-build/libX11-1.8.10/src/GetAtomNm.c:127:24: warning[-Wanalyzer-malloc-leak]: leak of 'malloc((long unsigned int)((int)*<unknown>.nameLength + 1))' libX11-1.8.10-build/libX11-1.8.10/src/GetAtomNm.c:30: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/GetAtomNm.c:124:32: note: in expansion of macro 'Xmalloc' # 125| _XGetAsyncData(dpy, state->names[state->idx], buf, len, # 126| SIZEOF(xGetAtomNameReply), repl->nameLength, # 127|-> repl->length << 2); # 128| if (state->names[state->idx]) { # 129| state->names[state->idx][repl->nameLength] = '\0'; Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] libX11-1.8.10-build/libX11-1.8.10/src/IntAtom.c: scope_hint: In function '_XUpdateAtomCache' libX11-1.8.10-build/libX11-1.8.10/src/IntAtom.c:158:32: warning[-Wanalyzer-malloc-leak]: leak of 'e' libX11-1.8.10-build/libX11-1.8.10/src/IntAtom.c:32: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/IntAtom.c:151:9: note: in expansion of macro 'Xmalloc' # 156| if ((oe = dpy->atoms->table[idx]) && (oe != RESERVED)) # 157| Xfree(oe); # 158|-> dpy->atoms->table[idx] = e; # 159| } # 160| } Error: GCC_ANALYZER_WARNING (CWE-457): [#def36] libX11-1.8.10-build/libX11-1.8.10/src/IntAtom.c: scope_hint: In function 'XInternAtom' libX11-1.8.10-build/libX11-1.8.10/src/IntAtom.c:180:40: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'idx' libX11-1.8.10-build/libX11-1.8.10/src/IntAtom.c:84:26: note: in expansion of macro 'HASH' # 178| return atom; # 179| } # 180|-> if (dpy->atoms && dpy->atoms->table[idx] == RESERVED) # 181| dpy->atoms->table[idx] = NULL; /* unreserve slot */ # 182| if (_XReply (dpy, (xReply *)&rep, 0, xTrue)) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def37] libX11-1.8.10-build/libX11-1.8.10/src/ModMap.c: scope_hint: In function 'XInsertModifiermapEntry' libX11-1.8.10-build/libX11-1.8.10/src/ModMap.c:157:41: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' # 155| for (i=0; i<map->max_keypermod; i++) # 156| newmap->modifiermap[ newrow+i ] = map->modifiermap[ row+i ]; # 157|-> newmap->modifiermap[ newrow+i ] = 0; # 158| row += map->max_keypermod; # 159| newrow += newmap->max_keypermod; Error: GCC_ANALYZER_WARNING (CWE-476): [#def38] libX11-1.8.10-build/libX11-1.8.10/src/OpenDis.c: scope_hint: In function 'OutOfMemory' libX11-1.8.10-build/libX11-1.8.10/src/OpenDis.c:712:27: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' # 710| static void OutOfMemory(Display *dpy) # 711| { # 712|-> xcb_connection_t *connection = dpy->xcb->connection; # 713| # 714| _XFreeDisplayStructure (dpy); Error: GCC_ANALYZER_WARNING (CWE-835): [#def39] libX11-1.8.10-build/libX11-1.8.10/src/ParseCol.c: scope_hint: In function 'XParseColor' libX11-1.8.10-build/libX11-1.8.10/src/ParseCol.c:67:17: warning[-Wanalyzer-infinite-loop]: infinite loop # 65| g = b; # 66| b = 0; # 67|-> for (i = 0; i < n; i++) { # 68| c = *spec++; # 69| b <<= 4; Error: GCC_ANALYZER_WARNING (CWE-476): [#def40] libX11-1.8.10-build/libX11-1.8.10/src/PolyTxt.c: scope_hint: In function 'XDrawText' libX11-1.8.10-build/libX11-1.8.10/src/PolyTxt.c:169:40: warning[-Wanalyzer-null-dereference]: dereference of NULL 'tbuf' # 167| } # 168| /* watch out for signs on chars */ # 169|-> *(unsigned char *)tbuf = 254; /* elt->len */ # 170| memcpy (tbuf+2 , CharacterOffset, 254); # 171| PartialNChars = PartialNChars - 254; Error: GCC_ANALYZER_WARNING (CWE-476): [#def41] libX11-1.8.10-build/libX11-1.8.10/src/PolyTxt.c:199:23: warning[-Wanalyzer-null-dereference]: dereference of NULL 'tbuf' # 197| *(tbuf+1) = 0; /* elt->delta */ # 198| } # 199|-> *tbuf = PartialNChars; /* elt->len */ # 200| memcpy (tbuf+2 , CharacterOffset, (size_t) PartialNChars); # 201| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def42] libX11-1.8.10-build/libX11-1.8.10/src/PolyTxt16.c: scope_hint: In function 'XDrawText16' libX11-1.8.10-build/libX11-1.8.10/src/PolyTxt16.c:169:26: warning[-Wanalyzer-null-dereference]: dereference of NULL 'elt' # 167| elt->delta = 0; # 168| } # 169|-> elt->len = 254; # 170| # 171| memcpy ((char *) (elt + 1), (char *)CharacterOffset, 254 * 2); Error: GCC_ANALYZER_WARNING (CWE-476): [#def43] libX11-1.8.10-build/libX11-1.8.10/src/PolyTxt16.c:203:26: warning[-Wanalyzer-null-dereference]: dereference of NULL 'elt' # 201| elt->delta = 0; # 202| } # 203|-> elt->len = PartialNChars; # 204| # 205| memcpy ((char *) (elt + 1), (char *)CharacterOffset, Error: GCC_ANALYZER_WARNING (CWE-416): [#def44] libX11-1.8.10-build/libX11-1.8.10/src/Region.c: scope_hint: In function 'miSetExtents' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:233:24: warning[-Wanalyzer-use-after-free]: use after 'reallocarray' of 'pBox' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:76: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:78: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:458:55: note: in definition of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:80: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/Region.c:984:29: note: in expansion of macro 'Xreallocarray' # 231| * to... # 232| */ # 233|-> pExtents->x1 = pBox->x1; # 234| pExtents->y1 = pBox->y1; # 235| pExtents->x2 = pBoxEnd->x2; Error: GCC_ANALYZER_WARNING (CWE-127): [#def45] libX11-1.8.10-build/libX11-1.8.10/src/Region.c: scope_hint: In function 'miCoalesce' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:612:27: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:458:55: note: in definition of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' # 610| */ # 611| pRegEnd--; # 612|-> while (pRegEnd[-1].y1 == pRegEnd->y1) # 613| { # 614| pRegEnd--; Error: GCC_ANALYZER_WARNING (CWE-127): [#def46] libX11-1.8.10-build/libX11-1.8.10/src/Region.c:612:41: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:458:55: note: in definition of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' # 610| */ # 611| pRegEnd--; # 612|-> while (pRegEnd[-1].y1 == pRegEnd->y1) # 613| { # 614| pRegEnd--; Error: GCC_ANALYZER_WARNING (CWE-401): [#def47] libX11-1.8.10-build/libX11-1.8.10/src/Region.c: scope_hint: In function 'miRegionOp' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:795:22: warning[-Wanalyzer-malloc-leak]: leak of 'oldRects' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' # 793| # 794| if (! (newReg->rects = Xmallocarray (newReg->size, sizeof(BoxRec)))) { # 795|-> newReg->size = 0; # 796| return; # 797| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def48] libX11-1.8.10-build/libX11-1.8.10/src/TextToStr.c: scope_hint: In function 'XTextPropertyToStringList' libX11-1.8.10-build/libX11-1.8.10/src/TextToStr.c:105:19: warning[-Wanalyzer-malloc-leak]: leak of 'cp' libX11-1.8.10-build/libX11-1.8.10/src/TextToStr.c:31: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/TextToStr.c:78:13: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/TextToStr.c:78:13: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/TextToStr.c:78:13: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/TextToStr.c:78:13: note: in expansion of macro 'Xmalloc' # 103| */ # 104| *list_return = list; # 105|-> *count_return = nelements; # 106| return True; # 107| } Error: COMPILER_WARNING (CWE-134): [#def49] libX11-1.8.10-build/libX11-1.8.10/src/XlibInt.c: scope_hint: In function '_XPrintDefaultError' libX11-1.8.10-build/libX11-1.8.10/src/XlibInt.c:1329:24: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked # 1329 | (void) fprintf(fp, mesg, event->request_code); # | ^~~~ # 1327| XGetErrorDatabaseText(dpy, mtype, "MajorCode", "Request Major code %d", # 1328| mesg, BUFSIZ); # 1329|-> (void) fprintf(fp, mesg, event->request_code); # 1330| if (event->request_code < 128) { # 1331| snprintf(number, sizeof(number), "%d", event->request_code); Error: COMPILER_WARNING (CWE-134): [#def50] libX11-1.8.10-build/libX11-1.8.10/src/XlibInt.c:1349:28: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked # 1349 | (void) fprintf(fp, mesg, event->minor_code); # | ^~~~ # 1347| mesg, BUFSIZ); # 1348| fputs(" ", fp); # 1349|-> (void) fprintf(fp, mesg, event->minor_code); # 1350| if (ext) { # 1351| snprintf(mesg, sizeof(mesg), "%s.%d", ext->name, event->minor_code); Error: COMPILER_WARNING (CWE-134): [#def51] libX11-1.8.10-build/libX11-1.8.10/src/XlibInt.c:1381:32: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked # 1381 | (void) fprintf(fp, mesg, event->resourceid); # | ^~~~ # 1379| if (mesg[0]) { # 1380| fputs(" ", fp); # 1381|-> (void) fprintf(fp, mesg, event->resourceid); # 1382| fputs("\n", fp); # 1383| } Error: COMPILER_WARNING (CWE-134): [#def52] libX11-1.8.10-build/libX11-1.8.10/src/XlibInt.c:1409:28: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked # 1409 | (void) fprintf(fp, mesg, event->resourceid); # | ^~~~ # 1407| mesg, BUFSIZ); # 1408| fputs(" ", fp); # 1409|-> (void) fprintf(fp, mesg, event->resourceid); # 1410| fputs("\n", fp); # 1411| } Error: COMPILER_WARNING (CWE-134): [#def53] libX11-1.8.10-build/libX11-1.8.10/src/XlibInt.c:1415:24: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked # 1415 | (void) fprintf(fp, mesg, event->serial); # | ^~~~ # 1413| mesg, BUFSIZ); # 1414| fputs(" ", fp); # 1415|-> (void) fprintf(fp, mesg, event->serial); # 1416| XGetErrorDatabaseText(dpy, mtype, "CurrentSerial", "Current Serial #%lld", # 1417| mesg, BUFSIZ); Error: COMPILER_WARNING (CWE-134): [#def54] libX11-1.8.10-build/libX11-1.8.10/src/XlibInt.c:1419:24: warning[-Wformat-nonliteral]: format not a string literal, argument types not checked # 1419 | (void) fprintf(fp, mesg, (unsigned long long)(X_DPY_GET_REQUEST(dpy))); # | ^~~~ # 1417| mesg, BUFSIZ); # 1418| fputs("\n ", fp); # 1419|-> (void) fprintf(fp, mesg, (unsigned long long)(X_DPY_GET_REQUEST(dpy))); # 1420| fputs("\n", fp); # 1421| if (event->error_code == BadImplementation) return 0; Error: GCC_ANALYZER_WARNING (CWE-835): [#def55] libX11-1.8.10-build/libX11-1.8.10/src/Xrm.c: scope_hint: In function 'XrmStringToQuarkList' libX11-1.8.10-build/libX11-1.8.10/src/Xrm.c:373:16: warning[-Wanalyzer-infinite-loop]: infinite loop # 371| if ((tname = (char *)name)) { # 372| tname--; # 373|-> while (!is_EOF(bits = next_char(ch, tname))) { # 374| if (is_binding (bits)) { # 375| if (i) { Error: COMPILER_WARNING (CWE-783): [#def56] libX11-1.8.10-build/libX11-1.8.10/src/Xrm.c: scope_hint: In function 'PutEntry' libX11-1.8.10-build/libX11-1.8.10/src/Xrm.c:900:36: warning[-Wlogical-not-parentheses]: logical not is only applied to the left hand side of comparison # 900 | !quarks[2] != table->leaf) # | ^~ libX11-1.8.10-build/libX11-1.8.10/src/Xrm.c:900:25: note: add parentheses around left hand side expression to silence this warning # 900 | !quarks[2] != table->leaf) # | ^~~~~~~~~~ # | ( ) # 898| table = *(prev = &table->next); # 899| if (!table || table->name != q || # 900|-> !quarks[2] != table->leaf) # 901| break; /* not found */ # 902| } Error: COMPILER_WARNING: [#def57] libX11-1.8.10-build/libX11-1.8.10/src/Xrm.c: scope_hint: In function 'GetDatabase' libX11-1.8.10-build/libX11-1.8.10/src/Xrm.c:1496:39: warning[-Wuse-after-free]: pointer 'rhs_260' may be used after 'realloc' # 1496 | ptr = temp_str + (ptr - rhs); /* reset pointer. */ # | ~~~~~^~~~~~ libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:458:30: note: call to 'realloc' here # 458 | # define Xrealloc(ptr, size) realloc((ptr), (size_t)((size) == 0 ? 1 : (size))) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1494| } # 1495| # 1496|-> ptr = temp_str + (ptr - rhs); /* reset pointer. */ # 1497| rhs = temp_str; # 1498| ptr_max = rhs + alloc_chars - 4; Error: COMPILER_WARNING: [#def58] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcConv.c:32: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/locking.h:37:9: warning: "xmalloc" redefined # 37 | #define xmalloc(s) Xmalloc(s) # | ^~~~~~~ libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:47: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcConv.c:29: included_from: Included from here. /usr/include/X11/Xthreads.h:34:11: note: this is the location of the previous definition # 34 | # define xmalloc malloc # | ^~~~~~~ # 35| #define _X_locking_H_ # 36| # 37|-> #define xmalloc(s) Xmalloc(s) # 38| #define xfree(s) Xfree(s) # 39| #include <X11/Xlib.h> Error: COMPILER_WARNING: [#def59] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcConv.c:32: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/locking.h:37:9: warning: 'xmalloc' redefined libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:47: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcConv.c:29: included_from: Included from here. /usr/include/X11/Xthreads.h:34:11: note: this is the location of the previous definition # 35| #define _X_locking_H_ # 36| # 37|-> #define xmalloc(s) Xmalloc(s) # 38| #define xfree(s) Xfree(s) # 39| #include <X11/Xlib.h> Error: COMPILER_WARNING: [#def60] libX11-1.8.10-build/libX11-1.8.10/src/locking.h:38:9: warning: "xfree" redefined # 38 | #define xfree(s) Xfree(s) # | ^~~~~ /usr/include/X11/Xthreads.h:37:11: note: this is the location of the previous definition # 37 | # define xfree free # | ^~~~~ # 36| # 37| #define xmalloc(s) Xmalloc(s) # 38|-> #define xfree(s) Xfree(s) # 39| #include <X11/Xlib.h> # 40| #include <X11/Xlibint.h> Error: COMPILER_WARNING: [#def61] libX11-1.8.10-build/libX11-1.8.10/src/locking.h:38:9: warning: 'xfree' redefined /usr/include/X11/Xthreads.h:37:11: note: this is the location of the previous definition # 36| # 37| #define xmalloc(s) Xmalloc(s) # 38|-> #define xfree(s) Xfree(s) # 39| #include <X11/Xlib.h> # 40| #include <X11/Xlibint.h> Error: GCC_ANALYZER_WARNING (CWE-762): [#def62] libX11-1.8.10-build/libX11-1.8.10/src/Region.c: scope_hint: In function 'miRegionCopy' libX11-1.8.10-build/libX11-1.8.10/src/reallocarray.h:39:5: warning[-Wanalyzer-mismatching-deallocation]: '*dstrgn.rects' should have been deallocated with 'free' but was deallocated with 'reallocarray' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:525:33: note: in expansion of macro 'Xreallocarray' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:525:33: note: in expansion of macro 'Xreallocarray' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:525:33: note: in expansion of macro 'Xreallocarray' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:525:33: note: in expansion of macro 'Xreallocarray' # 37| #if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__) # 38| # define Xreallocarray(ptr, n, size) \ # 39|-> reallocarray((ptr), ((n) == 0 ? 1 : (n)), size) # 40| #else # 41| # define Xreallocarray(ptr, n, size) reallocarray((ptr), (n), (size)) Error: GCC_ANALYZER_WARNING (CWE-762): [#def63] libX11-1.8.10-build/libX11-1.8.10/src/reallocarray.h:39:5: warning[-Wanalyzer-mismatching-deallocation]: 'prev_rects' should have been deallocated with 'free' but was deallocated with 'reallocarray' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:984:29: note: in expansion of macro 'Xreallocarray' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:145:26: note: in expansion of macro 'Xmalloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1434:11: note: in expansion of macro 'EXTENTCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:458:55: note: in definition of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xregion.h:115:28: note: in expansion of macro 'Xrealloc' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:1247:9: note: in expansion of macro 'MEMCHECK' libX11-1.8.10-build/libX11-1.8.10/src/Region.c:984:29: note: in expansion of macro 'Xreallocarray' # 37| #if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__) # 38| # define Xreallocarray(ptr, n, size) \ # 39|-> reallocarray((ptr), ((n) == 0 ? 1 : (n)), size) # 40| #else # 41| # define Xreallocarray(ptr, n, size) reallocarray((ptr), (n), (size)) Error: GCC_ANALYZER_WARNING (CWE-775): [#def64] libX11-1.8.10-build/libX11-1.8.10/src/util/makekeys.c: scope_hint: In function ‘main’ libX11-1.8.10-build/libX11-1.8.10/src/util/makekeys.c:74:42: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’ # 72| i = sscanf(buf, "#define %127s 0x%lx", key, val); # 73| if (i == 2 && (tmp = strstr(key, "XK_"))) { # 74|-> memcpy(prefix, key, (size_t)(tmp - key)); # 75| prefix[tmp - key] = '\0'; # 76| tmp += 3; Error: GCC_ANALYZER_WARNING (CWE-401): [#def65] libX11-1.8.10-build/libX11-1.8.10/src/util/makekeys.c:74:42: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’ # 72| i = sscanf(buf, "#define %127s 0x%lx", key, val); # 73| if (i == 2 && (tmp = strstr(key, "XK_"))) { # 74|-> memcpy(prefix, key, (size_t)(tmp - key)); # 75| prefix[tmp - key] = '\0'; # 76| tmp += 3; Error: GCC_ANALYZER_WARNING (CWE-775): [#def66] libX11-1.8.10-build/libX11-1.8.10/src/util/makekeys.c:84:42: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "r")’ # 82| i = sscanf(buf, "#define %127s _EVDEVK(0x%lx)", key, val); # 83| if (i == 2 && (tmp = strstr(key, "XK_"))) { # 84|-> memcpy(prefix, key, (size_t)(tmp - key)); # 85| prefix[tmp - key] = '\0'; # 86| tmp += 3; Error: GCC_ANALYZER_WARNING (CWE-401): [#def67] libX11-1.8.10-build/libX11-1.8.10/src/util/makekeys.c:84:42: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "r")’ # 82| i = sscanf(buf, "#define %127s _EVDEVK(0x%lx)", key, val); # 83| if (i == 2 && (tmp = strstr(key, "XK_"))) { # 84|-> memcpy(prefix, key, (size_t)(tmp - key)); # 85| prefix[tmp - key] = '\0'; # 86| tmp += 3; Error: GCC_ANALYZER_WARNING (CWE-457): [#def68] libX11-1.8.10-build/libX11-1.8.10/src/xcms/LRGB.c: scope_hint: In function '_XcmsTableSearch' libX11-1.8.10-build/libX11-1.8.10/src/xcms/LRGB.c:1196:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*(IntensityRec *)key.value' # 1194| /* use only the significants bits, then scale into 16 bits */ # 1195| ((IntensityRec *)key)->value = ((unsigned long) # 1196|-> (((IntensityRec *)key)->value >> (16 - bitsPerRGB)) * 0xFFFF) # 1197| / ((1 << bitsPerRGB) - 1); # 1198| Error: GCC_ANALYZER_WARNING (CWE-835): [#def69] libX11-1.8.10-build/libX11-1.8.10/src/xcms/LRGB.c: scope_hint: In function 'XcmsLRGB_RGB_ParseString' libX11-1.8.10-build/libX11-1.8.10/src/xcms/LRGB.c:1307:13: warning[-Wanalyzer-infinite-loop]: infinite loop # 1305| g = b; # 1306| b = 0; # 1307|-> for (i = n; --i >= 0; ) { # 1308| c = *spec++; # 1309| b <<= 4; Error: GCC_ANALYZER_WARNING (CWE-401): [#def70] libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBAlloc.c: scope_hint: In function 'XkbAllocNames' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBAlloc.c:131:20: warning[-Wanalyzer-malloc-leak]: leak of '*type.level_names' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBAlloc.c:33: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:459:50: note: in definition of macro 'Xcalloc' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBAlloc.c:130:37: note: in expansion of macro '_XkbTypedCalloc' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBlibint.h:122:39: note: in expansion of macro 'Xcalloc' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBAlloc.c:130:37: note: in expansion of macro '_XkbTypedCalloc' # 129| if (type->level_names == NULL) { # 130| type->level_names = _XkbTypedCalloc(type->num_levels, Atom); # 131|-> if (type->level_names == NULL) # 132| return BadAlloc; # 133| } Error: GCC_ANALYZER_WARNING (CWE-457): [#def71] libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBExtDev.c: scope_hint: In function '_XkbWriteSetDeviceInfo' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBExtDev.c:659:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*stuff.info' libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:345: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBExtDev.c:32: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/include/X11/XKBlib.h:31: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBlibint.h:31: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBExtDev.c:34: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBExtDev.c:820:5: note: in expansion of macro 'LockDisplay' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBExtDev.c:834:9: note: in expansion of macro 'BufAlloc' # 657| register LedInfoStuff *linfo; # 658| # 659|-> for (i = 0, linfo = &stuff->info[0]; i < stuff->num_info; i++, linfo++) { # 660| if (linfo->used) { # 661| register char *new_wire; Error: GCC_ANALYZER_WARNING (CWE-401): [#def72] libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBGAlloc.c: scope_hint: In function 'XkbAddGeomProperty' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBGAlloc.c:663:25: warning[-Wanalyzer-malloc-leak]: leak of '*prop.value' # 661| if ((prop->name) && (strcmp(name, prop->name) == 0)) { # 662| _XkbFree(prop->value); # 663|-> prop->value = strdup(value); # 664| return prop; # 665| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def73] libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBList.c: scope_hint: In function '_ReadListing' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBList.c:43:8: warning[-Wanalyzer-malloc-leak]: leak of 'this' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBList.c:31: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBlibint.h:122:39: note: in expansion of macro 'Xcalloc' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBList.c:68:13: note: in expansion of macro '_XkbTypedCalloc' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBlibint.h:122:39: note: in expansion of macro 'Xcalloc' libX11-1.8.10-build/libX11-1.8.10/src/xkb/XKBList.c:68:13: note: in expansion of macro '_XkbTypedCalloc' # 41| XkbComponentNamePtr tmp; # 42| # 43|-> if ((num < 1) || (names == NULL)) # 44| return; # 45| for (i = 0, tmp = names; i < num; i++, tmp++) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def74] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/XDefaultOMIF.c: scope_hint: In function 'parse_fontname' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/XDefaultOMIF.c:290:28: warning[-Wanalyzer-malloc-leak]: leak of 'get_font_name(oc, pattern)' # 288| int count; # 289| XFontStruct *fs; # 290|-> Display *dpy = oc->core.om->core.display; # 291| # 292| list = XListFonts(dpy, pattern, 1, &count); Error: GCC_ANALYZER_WARNING (CWE-688): [#def75] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcDB.c: scope_hint: In function 'read_line' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcDB.c:344:9: warning[-Wanalyzer-null-argument]: use of NULL 'str' where non-null expected libX11-1.8.10-build/libX11-1.8.10/include/X11/Xlibint.h:345: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcDB.c:40: included_from: Included from here. <built-in>: note: argument 1 of '__builtin_memcpy' must be non-null # 342| str = line->str; # 343| } # 344|-> memcpy(str + cur, p, (size_t) len); # 345| # 346| cur += len; Error: GCC_ANALYZER_WARNING (CWE-476): [#def76] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcGeneric.c: scope_hint: In function 'create_ctextseg' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcGeneric.c:664:14: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ptr' # 662| if (strchr(value[0],':')) { # 663| ptr = strchr(ret->name,':'); # 664|-> *ptr = '\0'; # 665| ptr++; # 666| if (!_XlcNCompareISOLatin1(ptr, "GL", 2)) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def77] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcGeneric.c: scope_hint: In function 'load_generic' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcGeneric.c:911:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'malloc(40)' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcGeneric.c:35: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcGeneric.c:910:35: note: in expansion of macro 'Xmalloc' # 909| _XlcDbg_printValue(name,value,num); # 910| codeset->mbconv = Xmalloc(sizeof(ConversionRec)); # 911|-> codeset->mbconv->convlist = # 912| _XlcParse_scopemaps(value[0],&(codeset->mbconv->conv_num)); # 913| dmpscope("mb_conv",codeset->mbconv->convlist, Error: GCC_ANALYZER_WARNING (CWE-476): [#def78] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcGeneric.c:923:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'malloc(40)' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcGeneric.c:922:35: note: in expansion of macro 'Xmalloc' # 921| _XlcDbg_printValue(name,value,num); # 922| codeset->ctconv = Xmalloc(sizeof(ConversionRec)); # 923|-> codeset->ctconv->convlist = # 924| _XlcParse_scopemaps(value[0],&(codeset->ctconv->conv_num)); # 925| dmpscope("ctconv",codeset->ctconv->convlist, Error: GCC_ANALYZER_WARNING (CWE-401): [#def79] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcPublic.c: scope_hint: In function 'load_public' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcPublic.c:134:8: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(str)' # 132| str = (num > 0) ? values[0] : "STRING"; # 133| pub->encoding_name = strdup(str); # 134|-> if (pub->encoding_name == NULL) # 135| return False; # 136| Error: GCC_ANALYZER_WARNING (CWE-476): [#def80] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c: scope_hint: In function 'utf8tocs' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:651:68: warning[-Wanalyzer-null-dereference]: dereference of NULL 'chosen_charset' # 649| } # 650| } else { # 651|-> if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name # 652| && (last_charset->side == XlcGLGR # 653| || last_charset->side == chosen_side))) Error: GCC_ANALYZER_WARNING (CWE-476): [#def81] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c: scope_hint: In function 'wcstocs' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:1528:68: warning[-Wanalyzer-null-dereference]: dereference of NULL 'chosen_charset' # 1526| } # 1527| } else { # 1528|-> if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name # 1529| && (last_charset->side == XlcGLGR # 1530| || last_charset->side == chosen_side))) Error: GCC_ANALYZER_WARNING (CWE-476): [#def82] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c: scope_hint: In function 'wcstocs1' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:1612:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 'chosen_charset' # 1610| } # 1611| # 1612|-> last_charset = _XlcGetCharSetWithSide(chosen_charset->name, chosen_side); # 1613| # 1614| if (last_charset == NULL) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def83] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c: scope_hint: In function 'iconv_mbstocs' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:1953:68: warning[-Wanalyzer-null-dereference]: dereference of NULL 'chosen_charset' # 1951| } # 1952| } else { # 1953|-> if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name # 1954| && (last_charset->side == XlcGLGR # 1955| || last_charset->side == chosen_side))) Error: GCC_ANALYZER_WARNING (CWE-476): [#def84] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c: scope_hint: In function 'iconv_mbtocs' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:2048:68: warning[-Wanalyzer-null-dereference]: dereference of NULL 'chosen_charset' # 2046| } # 2047| } else { # 2048|-> if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name # 2049| && (last_charset->side == XlcGLGR # 2050| || last_charset->side == chosen_side))) Error: GCC_ANALYZER_WARNING (CWE-787): [#def85] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:190: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/armscii_8.h: scope_hint: In function 'armscii_8_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/armscii_8.h:83:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/armscii_8.h:83:7: note: valid subscripts for 'armscii_8_page00' are '[0]' to '[7]' # 81| } # 82| else if (wc >= 0x0028 && wc < 0x0030) # 83|-> c = armscii_8_page00[wc-0x0028]; # 84| else if (wc >= 0x0030 && wc < 0x00a0) # 85| c = (unsigned char) wc; Error: GCC_ANALYZER_WARNING (CWE-787): [#def86] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/armscii_8.h:87:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/armscii_8.h:87:7: note: valid subscripts for 'armscii_8_page00_1' are '[0]' to '[31]' # 85| c = (unsigned char) wc; # 86| else if (wc >= 0x00a0 && wc < 0x00c0) # 87|-> c = armscii_8_page00_1[wc-0x00a0]; # 88| else if (wc >= 0x0530 && wc < 0x0590) # 89| c = armscii_8_page05[wc-0x0530]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def87] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/armscii_8.h:89:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/armscii_8.h:89:7: note: valid subscripts for 'armscii_8_page05' are '[0]' to '[95]' # 87| c = armscii_8_page00_1[wc-0x00a0]; # 88| else if (wc >= 0x0530 && wc < 0x0590) # 89|-> c = armscii_8_page05[wc-0x0530]; # 90| else if (wc >= 0x2010 && wc < 0x2028) # 91| c = armscii_8_page20[wc-0x2010]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def88] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/armscii_8.h:91:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/armscii_8.h:91:7: note: valid subscripts for 'armscii_8_page20' are '[0]' to '[23]' # 89| c = armscii_8_page05[wc-0x0530]; # 90| else if (wc >= 0x2010 && wc < 0x2028) # 91|-> c = armscii_8_page20[wc-0x2010]; # 92| if (c != 0) { # 93| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def89] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:191: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1133.h: scope_hint: In function 'cp1133_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1133.h:81:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1133.h:81:7: note: valid subscripts for 'cp1133_page00' are '[0]' to '[15]' # 79| } # 80| else if (wc >= 0x00a0 && wc < 0x00b0) # 81|-> c = cp1133_page00[wc-0x00a0]; # 82| else if (wc >= 0x0e80 && wc < 0x0ee0) # 83| c = cp1133_page0e[wc-0x0e80]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def90] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1133.h:83:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1133.h:83:7: note: valid subscripts for 'cp1133_page0e' are '[0]' to '[95]' # 81| c = cp1133_page00[wc-0x00a0]; # 82| else if (wc >= 0x0e80 && wc < 0x0ee0) # 83|-> c = cp1133_page0e[wc-0x0e80]; # 84| else if (wc == 0x20ad) # 85| c = 0xdf; Error: GCC_ANALYZER_WARNING (CWE-787): [#def91] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:197: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1251.h: scope_hint: In function 'cp1251_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1251.h:96:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1251.h:96:7: note: valid subscripts for 'cp1251_page00' are '[0]' to '[31]' # 94| } # 95| else if (wc >= 0x00a0 && wc < 0x00c0) # 96|-> c = cp1251_page00[wc-0x00a0]; # 97| else if (wc >= 0x0400 && wc < 0x0498) # 98| c = cp1251_page04[wc-0x0400]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def92] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1251.h:98:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1251.h:98:7: note: valid subscripts for 'cp1251_page04' are '[0]' to '[151]' # 96| c = cp1251_page00[wc-0x00a0]; # 97| else if (wc >= 0x0400 && wc < 0x0498) # 98|-> c = cp1251_page04[wc-0x0400]; # 99| else if (wc >= 0x2010 && wc < 0x2040) # 100| c = cp1251_page20[wc-0x2010]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def93] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1251.h:100:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1251.h:100:7: note: valid subscripts for 'cp1251_page20' are '[0]' to '[47]' # 98| c = cp1251_page04[wc-0x0400]; # 99| else if (wc >= 0x2010 && wc < 0x2040) # 100|-> c = cp1251_page20[wc-0x2010]; # 101| else if (wc == 0x20ac) # 102| c = 0x88; Error: GCC_ANALYZER_WARNING (CWE-787): [#def94] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:198: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1255.h: scope_hint: In function 'cp1255_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1255.h:100:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1255.h:100:7: note: valid subscripts for 'cp1255_page00' are '[0]' to '[87]' # 98| } # 99| else if (wc >= 0x00a0 && wc < 0x00f8) # 100|-> c = cp1255_page00[wc-0x00a0]; # 101| else if (wc == 0x0192) # 102| c = 0x83; Error: GCC_ANALYZER_WARNING (CWE-787): [#def95] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1255.h:104:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1255.h:104:7: note: valid subscripts for 'cp1255_page02' are '[0]' to '[31]' # 102| c = 0x83; # 103| else if (wc >= 0x02c0 && wc < 0x02e0) # 104|-> c = cp1255_page02[wc-0x02c0]; # 105| else if (wc >= 0x05b0 && wc < 0x05f8) # 106| c = cp1255_page05[wc-0x05b0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def96] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1255.h:106:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1255.h:106:7: note: valid subscripts for 'cp1255_page05' are '[0]' to '[71]' # 104| c = cp1255_page02[wc-0x02c0]; # 105| else if (wc >= 0x05b0 && wc < 0x05f8) # 106|-> c = cp1255_page05[wc-0x05b0]; # 107| else if (wc >= 0x2008 && wc < 0x2040) # 108| c = cp1255_page20[wc-0x2008]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def97] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1255.h:108:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1255.h:108:7: note: valid subscripts for 'cp1255_page20' are '[0]' to '[55]' # 106| c = cp1255_page05[wc-0x05b0]; # 107| else if (wc >= 0x2008 && wc < 0x2040) # 108|-> c = cp1255_page20[wc-0x2008]; # 109| else if (wc == 0x20aa) # 110| c = 0xa4; Error: GCC_ANALYZER_WARNING (CWE-787): [#def98] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:199: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1256.h: scope_hint: In function 'cp1256_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1256.h:116:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1256.h:116:7: note: valid subscripts for 'cp1256_page00' are '[0]' to '[95]' # 114| } # 115| else if (wc >= 0x00a0 && wc < 0x0100) # 116|-> c = cp1256_page00[wc-0x00a0]; # 117| else if (wc >= 0x0150 && wc < 0x0198) # 118| c = cp1256_page01[wc-0x0150]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def99] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1256.h:118:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1256.h:118:7: note: valid subscripts for 'cp1256_page01' are '[0]' to '[71]' # 116| c = cp1256_page00[wc-0x00a0]; # 117| else if (wc >= 0x0150 && wc < 0x0198) # 118|-> c = cp1256_page01[wc-0x0150]; # 119| else if (wc == 0x02c6) # 120| c = 0x88; Error: GCC_ANALYZER_WARNING (CWE-787): [#def100] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1256.h:122:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1256.h:122:7: note: valid subscripts for 'cp1256_page06' are '[0]' to '[207]' # 120| c = 0x88; # 121| else if (wc >= 0x0608 && wc < 0x06d8) # 122|-> c = cp1256_page06[wc-0x0608]; # 123| else if (wc >= 0x2008 && wc < 0x2040) # 124| c = cp1256_page20[wc-0x2008]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def101] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1256.h:124:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/cp1256.h:124:7: note: valid subscripts for 'cp1256_page20' are '[0]' to '[55]' # 122| c = cp1256_page06[wc-0x0608]; # 123| else if (wc >= 0x2008 && wc < 0x2040) # 124|-> c = cp1256_page20[wc-0x2008]; # 125| else if (wc == 0x20ac) # 126| c = 0x80; Error: GCC_ANALYZER_WARNING (CWE-787): [#def102] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:214: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h: scope_hint: In function 'gbk_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6146:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6146:9: note: valid subscripts for 'gbk_page01' are '[0]' to '[23]' # 6144| c = gbk_page00[wc-0x00a0]; # 6145| else if (wc >= 0x01c8 && wc < 0x01e0) # 6146|-> c = gbk_page01[wc-0x01c8]; # 6147| else if (wc >= 0x0250 && wc < 0x0268) # 6148| c = gbk_page02a[wc-0x0250]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def103] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6148:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6148:9: note: valid subscripts for 'gbk_page02a' are '[0]' to '[23]' # 6146| c = gbk_page01[wc-0x01c8]; # 6147| else if (wc >= 0x0250 && wc < 0x0268) # 6148|-> c = gbk_page02a[wc-0x0250]; # 6149| else if (wc >= 0x02c0 && wc < 0x02e0) # 6150| c = gbk_page02b[wc-0x02c0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def104] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6150:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6150:9: note: valid subscripts for 'gbk_page02b' are '[0]' to '[31]' # 6148| c = gbk_page02a[wc-0x0250]; # 6149| else if (wc >= 0x02c0 && wc < 0x02e0) # 6150|-> c = gbk_page02b[wc-0x02c0]; # 6151| else if (wc >= 0x0390 && wc < 0x03d0) # 6152| c = gbk_page03[wc-0x0390]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def105] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6152:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6152:9: note: valid subscripts for 'gbk_page03' are '[0]' to '[63]' # 6150| c = gbk_page02b[wc-0x02c0]; # 6151| else if (wc >= 0x0390 && wc < 0x03d0) # 6152|-> c = gbk_page03[wc-0x0390]; # 6153| else if (wc >= 0x0400 && wc < 0x0458) # 6154| c = gbk_page04[wc-0x0400]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def106] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6154:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6154:9: note: valid subscripts for 'gbk_page04' are '[0]' to '[87]' # 6152| c = gbk_page03[wc-0x0390]; # 6153| else if (wc >= 0x0400 && wc < 0x0458) # 6154|-> c = gbk_page04[wc-0x0400]; # 6155| else if (wc >= 0x2010 && wc < 0x2040) # 6156| c = gbk_page20[wc-0x2010]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def107] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6156:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6156:9: note: valid subscripts for 'gbk_page20' are '[0]' to '[47]' # 6154| c = gbk_page04[wc-0x0400]; # 6155| else if (wc >= 0x2010 && wc < 0x2040) # 6156|-> c = gbk_page20[wc-0x2010]; # 6157| else if (wc >= 0x2100 && wc < 0x21a0) # 6158| c = gbk_page21[wc-0x2100]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def108] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6158:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6158:9: note: valid subscripts for 'gbk_page21' are '[0]' to '[159]' # 6156| c = gbk_page20[wc-0x2010]; # 6157| else if (wc >= 0x2100 && wc < 0x21a0) # 6158|-> c = gbk_page21[wc-0x2100]; # 6159| else if (wc >= 0x2208 && wc < 0x22c0) # 6160| c = gbk_page22[wc-0x2208]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def109] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6160:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6160:9: note: valid subscripts for 'gbk_page22' are '[0]' to '[183]' # 6158| c = gbk_page21[wc-0x2100]; # 6159| else if (wc >= 0x2208 && wc < 0x22c0) # 6160|-> c = gbk_page22[wc-0x2208]; # 6161| else if (wc == 0x2312) # 6162| c = 0xa1d0; Error: GCC_ANALYZER_WARNING (CWE-787): [#def110] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6164:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6164:9: note: valid subscripts for 'gbk_page24' are '[0]' to '[63]' # 6162| c = 0xa1d0; # 6163| else if (wc >= 0x2460 && wc < 0x24a0) # 6164|-> c = gbk_page24[wc-0x2460]; # 6165| else if (wc >= 0x2500 && wc < 0x25e8) # 6166| c = gbk_page25[wc-0x2500]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def111] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6166:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6166:9: note: valid subscripts for 'gbk_page25' are '[0]' to '[231]' # 6164| c = gbk_page24[wc-0x2460]; # 6165| else if (wc >= 0x2500 && wc < 0x25e8) # 6166|-> c = gbk_page25[wc-0x2500]; # 6167| else if (wc >= 0x2600 && wc < 0x2648) # 6168| c = gbk_page26[wc-0x2600]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def112] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6168:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6168:9: note: valid subscripts for 'gbk_page26' are '[0]' to '[71]' # 6166| c = gbk_page25[wc-0x2500]; # 6167| else if (wc >= 0x2600 && wc < 0x2648) # 6168|-> c = gbk_page26[wc-0x2600]; # 6169| else if (wc >= 0x3000 && wc < 0x3130) # 6170| c = gbk_page30[wc-0x3000]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def113] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6170:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6170:9: note: valid subscripts for 'gbk_page30' are '[0]' to '[303]' # 6168| c = gbk_page26[wc-0x2600]; # 6169| else if (wc >= 0x3000 && wc < 0x3130) # 6170|-> c = gbk_page30[wc-0x3000]; # 6171| else if (wc >= 0x3220 && wc < 0x3238) # 6172| c = gbk_page32[wc-0x3220]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def114] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6172:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6172:9: note: valid subscripts for 'gbk_page32' are '[0]' to '[23]' # 6170| c = gbk_page30[wc-0x3000]; # 6171| else if (wc >= 0x3220 && wc < 0x3238) # 6172|-> c = gbk_page32[wc-0x3220]; # 6173| else if (wc == 0x32a3) # 6174| c = 0xa949; Error: GCC_ANALYZER_WARNING (CWE-787): [#def115] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6176:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6176:9: note: valid subscripts for 'gbk_page33' are '[0]' to '[79]' # 6174| c = 0xa949; # 6175| else if (wc >= 0x3388 && wc < 0x33d8) # 6176|-> c = gbk_page33[wc-0x3388]; # 6177| else if (wc >= 0x4e00 && wc < 0x9fa8) # 6178| c = gbk_page4e[wc-0x4e00]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def116] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6182:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6182:9: note: valid subscripts for 'gbk_pagef9a' are '[0]' to '[31]' # 6180| c = 0xfd9c; # 6181| else if (wc >= 0xf978 && wc < 0xf998) # 6182|-> c = gbk_pagef9a[wc-0xf978]; # 6183| else if (wc >= 0xf9e0 && wc < 0xf9f8) # 6184| c = gbk_pagef9b[wc-0xf9e0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def117] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6184:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6184:9: note: valid subscripts for 'gbk_pagef9b' are '[0]' to '[23]' # 6182| c = gbk_pagef9a[wc-0xf978]; # 6183| else if (wc >= 0xf9e0 && wc < 0xf9f8) # 6184|-> c = gbk_pagef9b[wc-0xf9e0]; # 6185| else if (wc >= 0xfa08 && wc < 0xfa30) # 6186| c = gbk_pagefa[wc-0xfa08]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def118] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6186:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6186:9: note: valid subscripts for 'gbk_pagefa' are '[0]' to '[39]' # 6184| c = gbk_pagef9b[wc-0xf9e0]; # 6185| else if (wc >= 0xfa08 && wc < 0xfa30) # 6186|-> c = gbk_pagefa[wc-0xfa08]; # 6187| else if (wc >= 0xfe30 && wc < 0xfe70) # 6188| c = gbk_pagefe[wc-0xfe30]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def119] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6188:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6188:9: note: valid subscripts for 'gbk_pagefe' are '[0]' to '[63]' # 6186| c = gbk_pagefa[wc-0xfa08]; # 6187| else if (wc >= 0xfe30 && wc < 0xfe70) # 6188|-> c = gbk_pagefe[wc-0xfe30]; # 6189| else if (wc >= 0xff00 && wc < 0xff60) # 6190| c = gbk_pageffa[wc-0xff00]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def120] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6190:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6190:9: note: valid subscripts for 'gbk_pageffa' are '[0]' to '[95]' # 6188| c = gbk_pagefe[wc-0xfe30]; # 6189| else if (wc >= 0xff00 && wc < 0xff60) # 6190|-> c = gbk_pageffa[wc-0xff00]; # 6191| else if (wc >= 0xffe0 && wc < 0xffe8) # 6192| c = gbk_pageffb[wc-0xffe0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def121] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6192:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/gbk.h:6192:9: note: valid subscripts for 'gbk_pageffb' are '[0]' to '[7]' # 6190| c = gbk_pageffa[wc-0xff00]; # 6191| else if (wc >= 0xffe0 && wc < 0xffe8) # 6192|-> c = gbk_pageffb[wc-0xffe0]; # 6193| if (c != 0) { # 6194| r[0] = (c >> 8); r[1] = (c & 0xff); Error: GCC_ANALYZER_WARNING (CWE-787): [#def122] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:195: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_academy.h: scope_hint: In function 'georgian_academy_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_academy.h:69:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_academy.h:69:7: note: valid subscripts for 'georgian_academy_page00' are '[0]' to '[31]' # 67| } # 68| else if (wc >= 0x0080 && wc < 0x00a0) # 69|-> c = georgian_academy_page00[wc-0x0080]; # 70| else if ((wc >= 0x00a0 && wc < 0x00c0) || (wc >= 0x00e7 && wc < 0x0100)) # 71| c = (unsigned char) wc; Error: GCC_ANALYZER_WARNING (CWE-787): [#def123] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_academy.h:73:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_academy.h:73:7: note: valid subscripts for 'georgian_academy_page01' are '[0]' to '[71]' # 71| c = (unsigned char) wc; # 72| else if (wc >= 0x0150 && wc < 0x0198) # 73|-> c = georgian_academy_page01[wc-0x0150]; # 74| else if (wc >= 0x02c0 && wc < 0x02e0) # 75| c = georgian_academy_page02[wc-0x02c0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def124] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_academy.h:75:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_academy.h:75:7: note: valid subscripts for 'georgian_academy_page02' are '[0]' to '[31]' # 73| c = georgian_academy_page01[wc-0x0150]; # 74| else if (wc >= 0x02c0 && wc < 0x02e0) # 75|-> c = georgian_academy_page02[wc-0x02c0]; # 76| else if (wc >= 0x10d0 && wc < 0x10f7) # 77| c = (unsigned char) (wc - 0x1010); Error: GCC_ANALYZER_WARNING (CWE-787): [#def125] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_academy.h:79:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_academy.h:79:7: note: valid subscripts for 'georgian_academy_page20' are '[0]' to '[47]' # 77| c = (unsigned char) (wc - 0x1010); # 78| else if (wc >= 0x2010 && wc < 0x2040) # 79|-> c = georgian_academy_page20[wc-0x2010]; # 80| else if (wc == 0x2122) # 81| c = 0x99; Error: GCC_ANALYZER_WARNING (CWE-787): [#def126] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:196: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h: scope_hint: In function 'georgian_ps_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:86:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:86:7: note: valid subscripts for 'georgian_ps_page00' are '[0]' to '[31]' # 84| } # 85| else if (wc >= 0x0080 && wc < 0x00a0) # 86|-> c = georgian_ps_page00[wc-0x0080]; # 87| else if ((wc >= 0x00a0 && wc < 0x00c0) || (wc >= 0x00e6 && wc < 0x0100)) # 88| c = (unsigned char) wc; Error: GCC_ANALYZER_WARNING (CWE-787): [#def127] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:90:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:90:7: note: valid subscripts for 'georgian_ps_page01' are '[0]' to '[71]' # 88| c = (unsigned char) wc; # 89| else if (wc >= 0x0150 && wc < 0x0198) # 90|-> c = georgian_ps_page01[wc-0x0150]; # 91| else if (wc >= 0x02c0 && wc < 0x02e0) # 92| c = georgian_ps_page02[wc-0x02c0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def128] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:92:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:92:7: note: valid subscripts for 'georgian_ps_page02' are '[0]' to '[31]' # 90| c = georgian_ps_page01[wc-0x0150]; # 91| else if (wc >= 0x02c0 && wc < 0x02e0) # 92|-> c = georgian_ps_page02[wc-0x02c0]; # 93| else if (wc >= 0x10d0 && wc < 0x10f8) # 94| c = georgian_ps_page10[wc-0x10d0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def129] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:94:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:94:7: note: valid subscripts for 'georgian_ps_page10' are '[0]' to '[39]' # 92| c = georgian_ps_page02[wc-0x02c0]; # 93| else if (wc >= 0x10d0 && wc < 0x10f8) # 94|-> c = georgian_ps_page10[wc-0x10d0]; # 95| else if (wc >= 0x2010 && wc < 0x2040) # 96| c = georgian_ps_page20[wc-0x2010]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def130] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:96:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/georgian_ps.h:96:7: note: valid subscripts for 'georgian_ps_page20' are '[0]' to '[47]' # 94| c = georgian_ps_page10[wc-0x10d0]; # 95| else if (wc >= 0x2010 && wc < 0x2040) # 96|-> c = georgian_ps_page20[wc-0x2010]; # 97| else if (wc == 0x2122) # 98| c = 0x99; Error: GCC_ANALYZER_WARNING (CWE-787): [#def131] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:179: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_11.h: scope_hint: In function 'iso8859_11_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_11.h:71:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_11.h:71:7: note: valid subscripts for 'iso8859_11_page0e' are '[0]' to '[95]' # 69| } # 70| else if (wc >= 0x0e00 && wc < 0x0e60) # 71|-> c = iso8859_11_page0e[wc-0x0e00]; # 72| if (c != 0) { # 73| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def132] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:180: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_13.h: scope_hint: In function 'iso8859_13_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_13.h:84:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_13.h:84:7: note: valid subscripts for 'iso8859_13_page20' are '[0]' to '[7]' # 82| c = iso8859_13_page00[wc-0x00a0]; # 83| else if (wc >= 0x2018 && wc < 0x2020) # 84|-> c = iso8859_13_page20[wc-0x2018]; # 85| if (c != 0) { # 86| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def133] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:181: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h: scope_hint: In function 'iso8859_14_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:94:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:94:7: note: valid subscripts for 'iso8859_14_page00' are '[0]' to '[95]' # 92| } # 93| else if (wc >= 0x00a0 && wc < 0x0100) # 94|-> c = iso8859_14_page00[wc-0x00a0]; # 95| else if (wc >= 0x0108 && wc < 0x0128) # 96| c = iso8859_14_page01_0[wc-0x0108]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def134] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:96:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:96:7: note: valid subscripts for 'iso8859_14_page01_0' are '[0]' to '[31]' # 94| c = iso8859_14_page00[wc-0x00a0]; # 95| else if (wc >= 0x0108 && wc < 0x0128) # 96|-> c = iso8859_14_page01_0[wc-0x0108]; # 97| else if (wc >= 0x0170 && wc < 0x0180) # 98| c = iso8859_14_page01_1[wc-0x0170]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def135] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:98:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:98:7: note: valid subscripts for 'iso8859_14_page01_1' are '[0]' to '[15]' # 96| c = iso8859_14_page01_0[wc-0x0108]; # 97| else if (wc >= 0x0170 && wc < 0x0180) # 98|-> c = iso8859_14_page01_1[wc-0x0170]; # 99| else if (wc >= 0x1e00 && wc < 0x1e88) # 100| c = iso8859_14_page1e_0[wc-0x1e00]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def136] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:100:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:100:7: note: valid subscripts for 'iso8859_14_page1e_0' are '[0]' to '[135]' # 98| c = iso8859_14_page01_1[wc-0x0170]; # 99| else if (wc >= 0x1e00 && wc < 0x1e88) # 100|-> c = iso8859_14_page1e_0[wc-0x1e00]; # 101| else if (wc >= 0x1ef0 && wc < 0x1ef8) # 102| c = iso8859_14_page1e_1[wc-0x1ef0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def137] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:102:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_14.h:102:7: note: valid subscripts for 'iso8859_14_page1e_1' are '[0]' to '[7]' # 100| c = iso8859_14_page1e_0[wc-0x1e00]; # 101| else if (wc >= 0x1ef0 && wc < 0x1ef8) # 102|-> c = iso8859_14_page1e_1[wc-0x1ef0]; # 103| if (c != 0) { # 104| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def138] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:182: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_15.h: scope_hint: In function 'iso8859_15_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_15.h:50:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_15.h:50:7: note: valid subscripts for 'iso8859_15_page00' are '[0]' to '[31]' # 48| } # 49| else if (wc >= 0x00a0 && wc < 0x00c0) # 50|-> c = iso8859_15_page00[wc-0x00a0]; # 51| else if (wc >= 0x00c0 && wc < 0x0100) # 52| c = (unsigned char) wc; Error: GCC_ANALYZER_WARNING (CWE-787): [#def139] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_15.h:54:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_15.h:54:7: note: valid subscripts for 'iso8859_15_page01' are '[0]' to '[47]' # 52| c = (unsigned char) wc; # 53| else if (wc >= 0x0150 && wc < 0x0180) # 54|-> c = iso8859_15_page01[wc-0x0150]; # 55| else if (wc == 0x20ac) # 56| c = 0xa4; Error: GCC_ANALYZER_WARNING (CWE-787): [#def140] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:183: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_16.h: scope_hint: In function 'iso8859_16_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_16.h:87:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_16.h:87:7: note: valid subscripts for 'iso8859_16_page02' are '[0]' to '[7]' # 85| c = iso8859_16_page00[wc-0x00a0]; # 86| else if (wc >= 0x0218 && wc < 0x0220) # 87|-> c = iso8859_16_page02[wc-0x0218]; # 88| else if (wc >= 0x2018 && wc < 0x2020) # 89| c = iso8859_16_page20[wc-0x2018]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def141] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_16.h:89:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_16.h:89:7: note: valid subscripts for 'iso8859_16_page20' are '[0]' to '[7]' # 87| c = iso8859_16_page02[wc-0x0218]; # 88| else if (wc >= 0x2018 && wc < 0x2020) # 89|-> c = iso8859_16_page20[wc-0x2018]; # 90| else if (wc == 0x20ac) # 91| c = 0xa4; Error: GCC_ANALYZER_WARNING (CWE-787): [#def142] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:170: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_2.h: scope_hint: In function 'iso8859_2_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_2.h:87:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_2.h:87:7: note: valid subscripts for 'iso8859_2_page02' are '[0]' to '[31]' # 85| c = iso8859_2_page00[wc-0x00a0]; # 86| else if (wc >= 0x02c0 && wc < 0x02e0) # 87|-> c = iso8859_2_page02[wc-0x02c0]; # 88| if (c != 0) { # 89| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def143] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:171: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_3.h: scope_hint: In function 'iso8859_3_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_3.h:89:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_3.h:89:7: note: valid subscripts for 'iso8859_3_page00' are '[0]' to '[95]' # 87| } # 88| else if (wc >= 0x00a0 && wc < 0x0100) # 89|-> c = iso8859_3_page00[wc-0x00a0]; # 90| else if (wc >= 0x0108 && wc < 0x0180) # 91| c = iso8859_3_page01[wc-0x0108]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def144] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_3.h:91:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_3.h:91:7: note: valid subscripts for 'iso8859_3_page01' are '[0]' to '[119]' # 89| c = iso8859_3_page00[wc-0x00a0]; # 90| else if (wc >= 0x0108 && wc < 0x0180) # 91|-> c = iso8859_3_page01[wc-0x0108]; # 92| else if (wc >= 0x02d8 && wc < 0x02e0) # 93| c = iso8859_3_page02[wc-0x02d8]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def145] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_3.h:93:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_3.h:93:7: note: valid subscripts for 'iso8859_3_page02' are '[0]' to '[7]' # 91| c = iso8859_3_page01[wc-0x0108]; # 92| else if (wc >= 0x02d8 && wc < 0x02e0) # 93|-> c = iso8859_3_page02[wc-0x02d8]; # 94| if (c != 0) { # 95| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def146] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:172: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_4.h: scope_hint: In function 'iso8859_4_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_4.h:87:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_4.h:87:7: note: valid subscripts for 'iso8859_4_page02' are '[0]' to '[31]' # 85| c = iso8859_4_page00[wc-0x00a0]; # 86| else if (wc >= 0x02c0 && wc < 0x02e0) # 87|-> c = iso8859_4_page02[wc-0x02c0]; # 88| if (c != 0) { # 89| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def147] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:173: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_5.h: scope_hint: In function 'iso8859_5_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_5.h:66:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_5.h:66:7: note: valid subscripts for 'iso8859_5_page00' are '[0]' to '[15]' # 64| } # 65| else if (wc >= 0x00a0 && wc < 0x00b0) # 66|-> c = iso8859_5_page00[wc-0x00a0]; # 67| else if (wc >= 0x0400 && wc < 0x0460) # 68| c = iso8859_5_page04[wc-0x0400]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def148] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_5.h:68:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_5.h:68:7: note: valid subscripts for 'iso8859_5_page04' are '[0]' to '[95]' # 66| c = iso8859_5_page00[wc-0x00a0]; # 67| else if (wc >= 0x0400 && wc < 0x0460) # 68|-> c = iso8859_5_page04[wc-0x0400]; # 69| else if (wc == 0x2116) # 70| c = 0xf0; Error: GCC_ANALYZER_WARNING (CWE-787): [#def149] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:174: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_6.h: scope_hint: In function 'iso8859_6_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_6.h:71:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_6.h:71:7: note: valid subscripts for 'iso8859_6_page00' are '[0]' to '[15]' # 69| } # 70| else if (wc >= 0x00a0 && wc < 0x00b0) # 71|-> c = iso8859_6_page00[wc-0x00a0]; # 72| else if (wc >= 0x0608 && wc < 0x0658) # 73| c = iso8859_6_page06[wc-0x0608]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def150] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_6.h:73:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_6.h:73:7: note: valid subscripts for 'iso8859_6_page06' are '[0]' to '[79]' # 71| c = iso8859_6_page00[wc-0x00a0]; # 72| else if (wc >= 0x0608 && wc < 0x0658) # 73|-> c = iso8859_6_page06[wc-0x0608]; # 74| if (c != 0) { # 75| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def151] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:175: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_7.h: scope_hint: In function 'iso8859_7_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_7.h:77:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_7.h:77:7: note: valid subscripts for 'iso8859_7_page00' are '[0]' to '[31]' # 75| } # 76| else if (wc >= 0x00a0 && wc < 0x00c0) # 77|-> c = iso8859_7_page00[wc-0x00a0]; # 78| else if (wc >= 0x0380 && wc < 0x03d0) # 79| c = iso8859_7_page03[wc-0x0380]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def152] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_7.h:79:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_7.h:79:7: note: valid subscripts for 'iso8859_7_page03' are '[0]' to '[79]' # 77| c = iso8859_7_page00[wc-0x00a0]; # 78| else if (wc >= 0x0380 && wc < 0x03d0) # 79|-> c = iso8859_7_page03[wc-0x0380]; # 80| else if (wc >= 0x2010 && wc < 0x2020) # 81| c = iso8859_7_page20[wc-0x2010]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def153] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_7.h:81:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_7.h:81:7: note: valid subscripts for 'iso8859_7_page20' are '[0]' to '[15]' # 79| c = iso8859_7_page03[wc-0x0380]; # 80| else if (wc >= 0x2010 && wc < 0x2020) # 81|-> c = iso8859_7_page20[wc-0x2010]; # 82| if (c != 0) { # 83| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def154] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:176: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_8.h: scope_hint: In function 'iso8859_8_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_8.h:78:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_8.h:78:7: note: valid subscripts for 'iso8859_8_page00' are '[0]' to '[87]' # 76| } # 77| else if (wc >= 0x00a0 && wc < 0x00f8) # 78|-> c = iso8859_8_page00[wc-0x00a0]; # 79| else if (wc >= 0x05d0 && wc < 0x05f0) # 80| c = iso8859_8_page05[wc-0x05d0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def155] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_8.h:80:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_8.h:80:7: note: valid subscripts for 'iso8859_8_page05' are '[0]' to '[31]' # 78| c = iso8859_8_page00[wc-0x00a0]; # 79| else if (wc >= 0x05d0 && wc < 0x05f0) # 80|-> c = iso8859_8_page05[wc-0x05d0]; # 81| else if (wc >= 0x2008 && wc < 0x2018) # 82| c = iso8859_8_page20[wc-0x2008]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def156] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_8.h:82:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_8.h:82:7: note: valid subscripts for 'iso8859_8_page20' are '[0]' to '[15]' # 80| c = iso8859_8_page05[wc-0x05d0]; # 81| else if (wc >= 0x2008 && wc < 0x2018) # 82|-> c = iso8859_8_page20[wc-0x2008]; # 83| if (c != 0) { # 84| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def157] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:177: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9.h: scope_hint: In function 'iso8859_9_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9.h:58:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9.h:58:7: note: valid subscripts for 'iso8859_9_page00' are '[0]' to '[47]' # 56| } # 57| else if (wc >= 0x00d0 && wc < 0x0100) # 58|-> c = iso8859_9_page00[wc-0x00d0]; # 59| else if (wc >= 0x0118 && wc < 0x0160) # 60| c = iso8859_9_page01[wc-0x0118]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def158] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9.h:60:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9.h:60:7: note: valid subscripts for 'iso8859_9_page01' are '[0]' to '[71]' # 58| c = iso8859_9_page00[wc-0x00d0]; # 59| else if (wc >= 0x0118 && wc < 0x0160) # 60|-> c = iso8859_9_page01[wc-0x0118]; # 61| if (c != 0) { # 62| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def159] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:184: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9e.h: scope_hint: In function 'iso8859_9e_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9e.h:86:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9e.h:86:7: note: valid subscripts for 'iso8859_9e_page00' are '[0]' to '[95]' # 84| } # 85| else if (wc >= 0x00a0 && wc < 0x0100) # 86|-> c = iso8859_9e_page00[wc-0x00a0]; # 87| else if (wc >= 0x0118 && wc < 0x01a0) # 88| c = iso8859_9e_page01[wc-0x0118]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def160] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9e.h:88:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9e.h:88:7: note: valid subscripts for 'iso8859_9e_page01' are '[0]' to '[135]' # 86| c = iso8859_9e_page00[wc-0x00a0]; # 87| else if (wc >= 0x0118 && wc < 0x01a0) # 88|-> c = iso8859_9e_page01[wc-0x0118]; # 89| else if (wc >= 0x01d0 && wc < 0x01e8) # 90| c = iso8859_9e_page01_d[wc-0x01d0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def161] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9e.h:90:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/iso8859_9e.h:90:7: note: valid subscripts for 'iso8859_9e_page01_d' are '[0]' to '[23]' # 88| c = iso8859_9e_page01[wc-0x0118]; # 89| else if (wc >= 0x01d0 && wc < 0x01e8) # 90|-> c = iso8859_9e_page01_d[wc-0x01d0]; # 91| else if (wc == 0x0259) # 92| c = 0xe6; Error: GCC_ANALYZER_WARNING (CWE-787): [#def162] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:187: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h: scope_hint: In function 'koi8_r_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:120:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:120:7: note: valid subscripts for 'koi8_r_page00' are '[0]' to '[87]' # 118| } # 119| else if (wc >= 0x00a0 && wc < 0x00f8) # 120|-> c = koi8_r_page00[wc-0x00a0]; # 121| else if (wc >= 0x0400 && wc < 0x0458) # 122| c = koi8_r_page04[wc-0x0400]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def163] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:122:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:122:7: note: valid subscripts for 'koi8_r_page04' are '[0]' to '[87]' # 120| c = koi8_r_page00[wc-0x00a0]; # 121| else if (wc >= 0x0400 && wc < 0x0458) # 122|-> c = koi8_r_page04[wc-0x0400]; # 123| else if (wc >= 0x2218 && wc < 0x2268) # 124| c = koi8_r_page22[wc-0x2218]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def164] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:124:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:124:7: note: valid subscripts for 'koi8_r_page22' are '[0]' to '[79]' # 122| c = koi8_r_page04[wc-0x0400]; # 123| else if (wc >= 0x2218 && wc < 0x2268) # 124|-> c = koi8_r_page22[wc-0x2218]; # 125| else if (wc >= 0x2320 && wc < 0x2328) # 126| c = koi8_r_page23[wc-0x2320]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def165] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:126:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:126:7: note: valid subscripts for 'koi8_r_page23' are '[0]' to '[7]' # 124| c = koi8_r_page22[wc-0x2218]; # 125| else if (wc >= 0x2320 && wc < 0x2328) # 126|-> c = koi8_r_page23[wc-0x2320]; # 127| else if (wc >= 0x2500 && wc < 0x25a8) # 128| c = koi8_r_page25[wc-0x2500]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def166] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:128:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_r.h:128:7: note: valid subscripts for 'koi8_r_page25' are '[0]' to '[167]' # 126| c = koi8_r_page23[wc-0x2320]; # 127| else if (wc >= 0x2500 && wc < 0x25a8) # 128|-> c = koi8_r_page25[wc-0x2500]; # 129| if (c != 0) { # 130| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def167] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:188: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h: scope_hint: In function 'koi8_u_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:128:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:128:7: note: valid subscripts for 'koi8_u_page00' are '[0]' to '[87]' # 126| } # 127| else if (wc >= 0x00a0 && wc < 0x00f8) # 128|-> c = koi8_u_page00[wc-0x00a0]; # 129| else if (wc >= 0x0400 && wc < 0x0498) # 130| c = koi8_u_page04[wc-0x0400]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def168] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:130:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:130:7: note: valid subscripts for 'koi8_u_page04' are '[0]' to '[151]' # 128| c = koi8_u_page00[wc-0x00a0]; # 129| else if (wc >= 0x0400 && wc < 0x0498) # 130|-> c = koi8_u_page04[wc-0x0400]; # 131| else if (wc >= 0x2218 && wc < 0x2268) # 132| c = koi8_u_page22[wc-0x2218]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def169] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:132:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:132:7: note: valid subscripts for 'koi8_u_page22' are '[0]' to '[79]' # 130| c = koi8_u_page04[wc-0x0400]; # 131| else if (wc >= 0x2218 && wc < 0x2268) # 132|-> c = koi8_u_page22[wc-0x2218]; # 133| else if (wc >= 0x2320 && wc < 0x2328) # 134| c = koi8_u_page23[wc-0x2320]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def170] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:134:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:134:7: note: valid subscripts for 'koi8_u_page23' are '[0]' to '[7]' # 132| c = koi8_u_page22[wc-0x2218]; # 133| else if (wc >= 0x2320 && wc < 0x2328) # 134|-> c = koi8_u_page23[wc-0x2320]; # 135| else if (wc >= 0x2500 && wc < 0x25a8) # 136| c = koi8_u_page25[wc-0x2500]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def171] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:136:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/koi8_u.h:136:7: note: valid subscripts for 'koi8_u_page25' are '[0]' to '[167]' # 134| c = koi8_u_page23[wc-0x2320]; # 135| else if (wc >= 0x2500 && wc < 0x25a8) # 136|-> c = koi8_u_page25[wc-0x2500]; # 137| if (c != 0) { # 138| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def172] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:192: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/mulelao.h: scope_hint: In function 'mulelao_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/mulelao.h:71:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/mulelao.h:71:7: note: valid subscripts for 'mulelao_page0e' are '[0]' to '[95]' # 69| c = 0xa0; # 70| else if (wc >= 0x0e80 && wc < 0x0ee0) # 71|-> c = mulelao_page0e[wc-0x0e80]; # 72| if (c != 0) { # 73| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def173] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:200: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tatar_cyr.h: scope_hint: In function 'tatar_cyr_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tatar_cyr.h:108:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tatar_cyr.h:108:7: note: valid subscripts for 'tatar_cyr_page00' are '[0]' to '[31]' # 106| } # 107| else if (wc >= 0x00a0 && wc < 0x00bc) # 108|-> c = tatar_cyr_page00[wc-0x00a0]; # 109| else if (wc >= 0x0400 && wc < 0x04ef) # 110| c = tatar_cyr_page04[wc-0x0400]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def174] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tatar_cyr.h:112:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tatar_cyr.h:112:7: note: valid subscripts for 'tatar_cyr_page20' are '[0]' to '[47]' # 110| c = tatar_cyr_page04[wc-0x0400]; # 111| else if (wc >= 0x2010 && wc < 0x203b) # 112|-> c = tatar_cyr_page20[wc-0x2010]; # 113| else if (wc == 0x20ac) # 114| c = 0x88; Error: GCC_ANALYZER_WARNING (CWE-787): [#def175] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tatar_cyr.h:116:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tatar_cyr.h:116:7: note: valid subscripts for 'tatar_cyr_page21' are '[0]' to '[23]' # 114| c = 0x88; # 115| else if (wc >= 0x2110 && wc < 0x2123) # 116|-> c = tatar_cyr_page21[wc-0x2110]; # 117| if (c != 0) { # 118| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def176] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:194: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tcvn.h: scope_hint: In function 'tcvn_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tcvn.h:125:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tcvn.h:125:7: note: valid subscripts for 'tcvn_page03' are '[0]' to '[39]' # 123| c = tcvn_page00[wc-0x00a0]; # 124| else if (wc >= 0x0300 && wc < 0x0328) # 125|-> c = tcvn_page03[wc-0x0300]; # 126| else if (wc >= 0x1ea0 && wc < 0x1f00) # 127| c = tcvn_page1e[wc-0x1ea0]; Error: GCC_ANALYZER_WARNING (CWE-787): [#def177] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tcvn.h:127:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tcvn.h:127:7: note: valid subscripts for 'tcvn_page1e' are '[0]' to '[95]' # 125| c = tcvn_page03[wc-0x0300]; # 126| else if (wc >= 0x1ea0 && wc < 0x1f00) # 127|-> c = tcvn_page1e[wc-0x1ea0]; # 128| if (c != 0) { # 129| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def178] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:186: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tis620.h: scope_hint: In function 'tis620_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tis620.h:71:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/tis620.h:71:7: note: valid subscripts for 'tis620_page0e' are '[0]' to '[95]' # 69| } # 70| else if (wc >= 0x0e00 && wc < 0x0e60) # 71|-> c = tis620_page0e[wc-0x0e00]; # 72| if (c != 0) { # 73| *r = c; Error: GCC_ANALYZER_WARNING (CWE-787): [#def179] libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUTF8.c:193: included_from: Included from here. libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/viscii.h: scope_hint: In function 'viscii_wctomb' libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/viscii.h:116:7: warning[-Wanalyzer-out-of-bounds]: buffer over-read libX11-1.8.10-build/libX11-1.8.10/src/xlibi18n/lcUniConv/viscii.h:116:7: note: valid subscripts for 'viscii_page1e' are '[0]' to '[95]' # 114| c = viscii_page00[wc-0x00c0]; # 115| else if (wc >= 0x1ea0 && wc < 0x1f00) # 116|-> c = viscii_page1e[wc-0x1ea0]; # 117| if (c != 0) { # 118| *r = c;
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-101.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libX11-1.8.10-2.fc42 |
store-results-to | /tmp/tmpv8qgt71w/libX11-1.8.10-2.fc42.tar.xz |
time-created | 2024-11-13 01:19:19 |
time-finished | 2024-11-13 01:24:37 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpv8qgt71w/libX11-1.8.10-2.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpv8qgt71w/libX11-1.8.10-2.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |