Task #118 - libunistring-1.1-7.fc41/scan-results.err
back to task #118download
Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/amemxfrm.c: scope_hint: In function 'libunistring_amemxfrm' libunistring-1.1/lib/amemxfrm.c:67:20: warning[-Wanalyzer-malloc-leak]: leak of 'result' libunistring-1.1/lib/amemxfrm.c:23: included_from: Included from here. # 65| { # 66| /* Search next NUL byte. */ # 67|-> size_t l = strlen (p); # 68| # 69| for (;;) Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/amemxfrm.c: scope_hint: In function ‘amemxfrm’ libunistring-1.1/lib/amemxfrm.c:67:20: warning[-Wanalyzer-malloc-leak]: leak of ‘result’ libunistring-1.1/lib/amemxfrm.c:23: included_from: Included from here. # 65| { # 66| /* Search next NUL byte. */ # 67|-> size_t l = strlen (p); # 68| # 69| for (;;) Error: CLANG_WARNING: libunistring-1.1/lib/amemxfrm.c:147:11: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 145| if ((length > 0 ? length : 1) <= *lengthp) # 146| { # 147|-> memcpy (resultbuf, result, length); # 148| free (result); # 149| result = resultbuf; Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/localename.c: scope_hint: In function 'struniq' libunistring-1.1/lib/localename.c:2707:10: warning[-Wanalyzer-malloc-leak]: leak of 'new_node' # 2705| if (mt) gl_lock_unlock (struniq_lock); # 2706| } # 2707|-> return new_node->contents; # 2708| } # 2709| Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/localename.c: scope_hint: In function ‘struniq’ libunistring-1.1/lib/localename.c:2707:10: warning[-Wanalyzer-malloc-leak]: leak of ‘new_node’ # 2705| if (mt) gl_lock_unlock (struniq_lock); # 2706| } # 2707|-> return new_node->contents; # 2708| } # 2709| Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/striconveh.c: scope_hint: In function 'libunistring_iconveh_open' libunistring-1.1/lib/striconveh.c:71:10: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open("UTF-8", from_codeset)' libunistring-1.1/lib/striconveh.c:1106:1: note: in expansion of macro 'mem_iconveh' libunistring-1.1/lib/striconveh.c:1146:11: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:47:1: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_iconveh_open' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro 'STRCASEEQ' # 69| { # 70| cd1 = iconv_open ("UTF-8", from_codeset); # 71|-> if (cd1 == (iconv_t)(-1)) # 72| { # 73| int saved_errno = errno; Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/striconveh.c: scope_hint: In function ‘iconveh_open’ libunistring-1.1/lib/striconveh.c:71:10: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open("UTF-8", from_codeset)’ libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘iconveh_open’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro ‘STRCASEEQ’ # 69| { # 70| cd1 = iconv_open ("UTF-8", from_codeset); # 71|-> if (cd1 == (iconv_t)(-1)) # 72| { # 73| int saved_errno = errno; Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/striconveh.c:92:10: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(to_codeset, "UTF-8")' libunistring-1.1/lib/striconveh.c:1106:1: note: in expansion of macro 'mem_iconveh' libunistring-1.1/lib/striconveh.c:1146:11: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:47:1: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_iconveh_open' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_iconveh_open' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/striconveh.c:85:10: note: in expansion of macro 'c_strcasecmp' # 90| { # 91| cd2 = iconv_open (to_codeset, "UTF-8"); # 92|-> if (cd2 == (iconv_t)(-1)) # 93| { # 94| int saved_errno = errno; Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/striconveh.c:92:10: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(to_codeset, "UTF-8")’ libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘iconveh_open’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘iconveh_open’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro ‘STRCASEEQ’ # 90| { # 91| cd2 = iconv_open (to_codeset, "UTF-8"); # 92|-> if (cd2 == (iconv_t)(-1)) # 93| { # 94| int saved_errno = errno; Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/striconveh.c: scope_hint: In function 'libunistring_str_cd_iconveh' libunistring-1.1/lib/striconveh.c:373:7: warning[-Wanalyzer-malloc-leak]: leak of 'libunistring_str_cd_iconveh(src, & cd, handler)' libunistring-1.1/lib/striconveh.c:1186:1: note: in expansion of macro 'str_iconveh' libunistring-1.1/lib/striconveh.c:1204:11: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:1204:11: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:47:1: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_str_cd_iconveh' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:148:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_str_cd_iconveh' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:134:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_str_cd_iconveh' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:120:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_str_cd_iconveh' libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:106:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_str_cd_iconveh' libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:92:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_str_cd_iconveh' libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'libunistring_str_cd_iconveh' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/striconveh.c:1204:11: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:1207:16: note: in expansion of macro 'str_cd_iconveh' libunistring-1.1/lib/striconveh.c:1207:16: note: in expansion of macro 'str_cd_iconveh' libunistring-1.1/lib/striconveh.c:1207:16: note: in expansion of macro 'str_cd_iconveh' libunistring-1.1/lib/striconveh.c:1077:1: note: in expansion of macro 'str_cd_iconveh' # 371| size_t last_length = (size_t)(-1); /* only needed if offsets != NULL */ # 372| # 373|-> if (*resultp != NULL && *lengthp >= sizeof (tmpbuf)) # 374| { # 375| initial_result = *resultp; Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/lib/striconveh.c: scope_hint: In function ‘str_cd_iconveh’ libunistring-1.1/lib/striconveh.c:373:7: warning[-Wanalyzer-malloc-leak]: leak of ‘str_cd_iconveh(src, & cd, handler)’ libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘str_cd_iconveh’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:148:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘str_cd_iconveh’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:134:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘str_cd_iconveh’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:120:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘str_cd_iconveh’ libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:106:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘str_cd_iconveh’ libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:92:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘str_cd_iconveh’ libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘str_cd_iconveh’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro ‘STRCASEEQ’ # 371| size_t last_length = (size_t)(-1); /* only needed if offsets != NULL */ # 372| # 373|-> if (*resultp != NULL && *lengthp >= sizeof (tmpbuf)) # 374| { # 375| initial_result = *resultp; Error: GCC_ANALYZER_WARNING (CWE-688): libunistring-1.1/lib/striconveha.c: scope_hint: In function 'libunistring_str_iconveha' libunistring-1.1/lib/striconveha.c:339:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL '<unknown>' where non-null expected libunistring-1.1/lib/striconveha.c:18: included_from: Included from here. libunistring-1.1/lib/malloca.h:70:6: note: in expansion of macro 'mmalloca' libunistring-1.1/lib/striconveha.c:338:44: note: in expansion of macro 'malloca' libunistring-1.1/lib/malloca.h:70:6: note: in expansion of macro 'mmalloca' libunistring-1.1/lib/striconveha.c:338:44: note: in expansion of macro 'malloca' <built-in>: note: argument 1 of '__builtin_memcpy' must be non-null # 337| size_t len = strlen (to_codeset); # 338| char *to_codeset_suffixed = (char *) malloca (len + 10 + 1); # 339|-> memcpy (to_codeset_suffixed, to_codeset, len); # 340| memcpy (to_codeset_suffixed + len, "//TRANSLIT", 10 + 1); # 341| Error: GCC_ANALYZER_WARNING (CWE-688): libunistring-1.1/lib/striconveha.c: scope_hint: In function ‘str_iconveha’ libunistring-1.1/lib/striconveha.c:339:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘<unknown>’ where non-null expected libunistring-1.1/lib/striconveha.c:27: included_from: Included from here. libunistring-1.1/lib/striconveha.c:338:44: note: in expansion of macro ‘malloca’ libunistring-1.1/lib/striconveha.c:338:44: note: in expansion of macro ‘malloca’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 337| size_t len = strlen (to_codeset); # 338| char *to_codeset_suffixed = (char *) malloca (len + 10 + 1); # 339|-> memcpy (to_codeset_suffixed, to_codeset, len); # 340| memcpy (to_codeset_suffixed + len, "//TRANSLIT", 10 + 1); # 341| Error: GCC_ANALYZER_WARNING (CWE-131): libunistring-1.1/lib/unicase/u32-casemap.c:47: included_from: Included from here. libunistring-1.1/lib/unicase/u-casemap.h: scope_hint: In function ‘u32_casemap’ libunistring-1.1/lib/unicase/u-casemap.h:395:29: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size # 393| { # 394| /* Return a non-NULL value. NULL means error. */ # 395|-> result = (UNIT *) malloc (1); # 396| if (result == NULL) # 397| { Error: GCC_ANALYZER_WARNING (CWE-476): libunistring-1.1/lib/unicase/u16-ct-totitle.c:50: included_from: Included from here. libunistring-1.1/lib/unicase/u-ct-totitle.h: scope_hint: In function 'u16_ct_totitle' libunistring-1.1/lib/unicase/u-ct-totitle.h:111:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'wp' libunistring-1.1/lib/unicase/u-ct-totitle.h:34:1: note: in expansion of macro 'FUNC' libunistring-1.1/lib/unicase/u-ct-totitle.h:103:21: note: in expansion of macro 'U_MBTOUC_UNSAFE' libunistring-1.1/lib/unicase/u16-ct-totitle.c:35: included_from: Included from here. libunistring-1.1/lib/unicase/u-ct-totitle.h:103:21: note: in expansion of macro 'U_MBTOUC_UNSAFE' # 109| unsigned int mapped_count; # 110| # 111|-> if (*wp) # 112| /* Crossing a word boundary. */ # 113| in_word_first_part = true; Error: GCC_ANALYZER_WARNING (CWE-476): libunistring-1.1/lib/unicase/u16-ct-totitle.c:50: included_from: Included from here. libunistring-1.1/lib/unicase/u-ct-totitle.h: scope_hint: In function ‘u16_ct_totitle’ libunistring-1.1/lib/unicase/u-ct-totitle.h:111:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘wp’ libunistring-1.1/lib/unicase/u-ct-totitle.h:34:1: note: in expansion of macro ‘FUNC’ libunistring-1.1/lib/unicase/u-ct-totitle.h:103:21: note: in expansion of macro ‘U_MBTOUC_UNSAFE’ libunistring-1.1/lib/unicase/u16-ct-totitle.c:35: included_from: Included from here. libunistring-1.1/lib/unicase/u-ct-totitle.h:103:21: note: in expansion of macro ‘U_MBTOUC_UNSAFE’ # 109| unsigned int mapped_count; # 110| # 111|-> if (*wp) # 112| /* Crossing a word boundary. */ # 113| in_word_first_part = true; Error: GCC_ANALYZER_WARNING (CWE-131): libunistring-1.1/lib/unicase/u-ct-totitle.h:474:29: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size # 472| { # 473| /* Return a non-NULL value. NULL means error. */ # 474|-> result = (UNIT *) malloc (1); # 475| if (result == NULL) # 476| { Error: GCC_ANALYZER_WARNING (CWE-476): libunistring-1.1/lib/uniconv/u16-conv-to-enc.c:185: included_from: Included from here. libunistring-1.1/lib/uniconv/u-conv-to-enc.h: scope_hint: In function 'u16_conv_to_encoding' libunistring-1.1/lib/uniconv/u-conv-to-enc.h:70:36: warning[-Wanalyzer-null-dereference]: dereference of NULL 'scaled_offsets' # 68| # 69| for (i = 0; i < srclen; i++) # 70|-> offsets[i] = scaled_offsets[i * sizeof (UNIT)]; # 71| free (scaled_offsets); # 72| } Error: GCC_ANALYZER_WARNING (CWE-476): libunistring-1.1/lib/uniconv/u16-conv-to-enc.c:185: included_from: Included from here. libunistring-1.1/lib/uniconv/u-conv-to-enc.h: scope_hint: In function ‘u16_conv_to_encoding’ libunistring-1.1/lib/uniconv/u-conv-to-enc.h:70:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘scaled_offsets’ # 68| # 69| for (i = 0; i < srclen; i++) # 70|-> offsets[i] = scaled_offsets[i * sizeof (UNIT)]; # 71| free (scaled_offsets); # 72| } Error: CLANG_WARNING: libunistring-1.1/lib/unictype/bidi_byname.c:33: included_from: Included from here. libunistring-1.1/lib/unictype/bidi_byname.gperf:119:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined Error: CLANG_WARNING: libunistring-1.1/lib/unictype/bidi_byname.gperf:137:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined Error: CLANG_WARNING: libunistring-1.1/lib/unictype/categ_byname.c:79: included_from: Included from here. libunistring-1.1/lib/unictype/categ_byname.gperf:119:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 117| Symbol, UC_CATEGORY_INDEX_S # 118| Math Symbol, UC_CATEGORY_INDEX_Sm # 119|-> MathSymbol, UC_CATEGORY_INDEX_Sm # 120| Currency Symbol, UC_CATEGORY_INDEX_Sc # 121| CurrencySymbol, UC_CATEGORY_INDEX_Sc Error: CLANG_WARNING: libunistring-1.1/lib/unictype/categ_byname.gperf:131:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 129| Line Separator, UC_CATEGORY_INDEX_Zl # 130| LineSeparator, UC_CATEGORY_INDEX_Zl # 131|-> Paragraph Separator, UC_CATEGORY_INDEX_Zp # 132| ParagraphSeparator, UC_CATEGORY_INDEX_Zp # 133| Other, UC_CATEGORY_INDEX_C Error: CLANG_WARNING: libunistring-1.1/lib/unictype/categ_byname.gperf:142:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined Error: CLANG_WARNING: libunistring-1.1/lib/unictype/combiningclass_byname.c:33: included_from: Included from here. libunistring-1.1/lib/unictype/combiningclass_byname.gperf:119:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined Error: CLANG_WARNING: libunistring-1.1/lib/unictype/combiningclass_byname.gperf:134:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined Error: CLANG_WARNING: libunistring-1.1/lib/unictype/joininggroup_byname.c:33: included_from: Included from here. libunistring-1.1/lib/unictype/joininggroup_byname.gperf:119:51: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value # 117| Manichaean Gimel, UC_JOINING_GROUP_MANICHAEAN_GIMEL # 118| ManichaeanGimel, UC_JOINING_GROUP_MANICHAEAN_GIMEL # 119|-> Manichaean Daleth, UC_JOINING_GROUP_MANICHAEAN_DALETH # 120| ManichaeanDaleth, UC_JOINING_GROUP_MANICHAEAN_DALETH # 121| Manichaean Waw, UC_JOINING_GROUP_MANICHAEAN_WAW Error: CLANG_WARNING: libunistring-1.1/lib/unictype/joininggroup_byname.gperf:127:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 125| Manichaean Heth, UC_JOINING_GROUP_MANICHAEAN_HETH # 126| ManichaeanHeth, UC_JOINING_GROUP_MANICHAEAN_HETH # 127|-> Manichaean Teth, UC_JOINING_GROUP_MANICHAEAN_TETH # 128| ManichaeanTeth, UC_JOINING_GROUP_MANICHAEAN_TETH # 129| Manichaean Yodh, UC_JOINING_GROUP_MANICHAEAN_YODH Error: CLANG_WARNING: libunistring-1.1/lib/unictype/joininggroup_byname.gperf:135:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 133| Manichaean Lamedh, UC_JOINING_GROUP_MANICHAEAN_LAMEDH # 134| ManichaeanLamedh, UC_JOINING_GROUP_MANICHAEAN_LAMEDH # 135|-> Manichaean Dhamedh, UC_JOINING_GROUP_MANICHAEAN_DHAMEDH # 136| ManichaeanDhamedh, UC_JOINING_GROUP_MANICHAEAN_DHAMEDH # 137| Manichaean Thamedh, UC_JOINING_GROUP_MANICHAEAN_THAMEDH Error: CLANG_WARNING: libunistring-1.1/lib/unictype/joininggroup_byname.gperf:150:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 148| ManichaeanPe, UC_JOINING_GROUP_MANICHAEAN_PE # 149| Manichaean Sadhe, UC_JOINING_GROUP_MANICHAEAN_SADHE # 150|-> ManichaeanSadhe, UC_JOINING_GROUP_MANICHAEAN_SADHE # 151| Manichaean Qoph, UC_JOINING_GROUP_MANICHAEAN_QOPH # 152| ManichaeanQoph, UC_JOINING_GROUP_MANICHAEAN_QOPH Error: CLANG_WARNING: libunistring-1.1/lib/unictype/joininggroup_byname.gperf:161:17: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 159| Manichaean Five, UC_JOINING_GROUP_MANICHAEAN_FIVE # 160| ManichaeanFive, UC_JOINING_GROUP_MANICHAEAN_FIVE # 161|-> Manichaean Ten, UC_JOINING_GROUP_MANICHAEAN_TEN # 162| ManichaeanTen, UC_JOINING_GROUP_MANICHAEAN_TEN # 163| Manichaean Twenty, UC_JOINING_GROUP_MANICHAEAN_TWENTY Error: CLANG_WARNING: libunistring-1.1/lib/unigbrk/ulc-grapheme-breaks.c:115:34: warning[core.NullDereference]: Array access (from variable 'q') results in a null pointer dereference # 113| for (i = 0; i < n; i++) # 114| if (offsets[i] != (size_t)(-1)) # 115|-> p[i] = q[offsets[i]]; # 116| # 117| free (q); Error: CLANG_WARNING: libunistring-1.1/lib/unilbrk/ulc-possible-linebreaks.c:90:34: warning[core.NullDereference]: Array access (from variable 'q') results in a null pointer dereference # 88| for (i = 0; i < n; i++) # 89| if (offsets[i] != (size_t)(-1)) # 90|-> p[i] = q[offsets[i]]; # 91| # 92| free (q); Error: CLANG_WARNING: libunistring-1.1/lib/unilbrk/ulc-width-linebreaks.c:91:27: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 89| if (o != NULL) # 90| { # 91|-> memset (o8, UC_BREAK_UNDEFINED, m); # 92| for (i = 0; i < n; i++) # 93| if (offsets[i] != (size_t)(-1)) Error: CLANG_WARNING: libunistring-1.1/lib/unilbrk/ulc-width-linebreaks.c:105:34: warning[core.NullDereference]: Array access (from variable 'q') results in a null pointer dereference # 103| for (i = 0; i < n; i++) # 104| if (offsets[i] != (size_t)(-1)) # 105|-> p[i] = q[offsets[i]]; # 106| # 107| free (memory); Error: GCC_ANALYZER_WARNING (CWE-457): libunistring-1.1/lib/uniname/uniname.c: scope_hint: In function 'unicode_name_word_lookup' libunistring-1.1/lib/uniname/uniname.c:116:24: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*w' # 114| for (;;) # 115| { # 116|-> if (*p < *w) # 117| { # 118| if (i1 == i) Error: GCC_ANALYZER_WARNING (CWE-457): libunistring-1.1/lib/uniname/uniname.c: scope_hint: In function ‘unicode_name_word_lookup’ libunistring-1.1/lib/uniname/uniname.c:116:24: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*w’ # 114| for (;;) # 115| { # 116|-> if (*p < *w) # 117| { # 118| if (i1 == i) Error: GCC_ANALYZER_WARNING (CWE-457): libunistring-1.1/lib/uniname/uniname.c: scope_hint: In function 'unicode_name_character' libunistring-1.1/lib/uniname/uniname.c:392:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'buf[1]' # 390| if (ptr >= buf + 3 && *p1++ == 'V') # 391| { # 392|-> if (*p1++ == 'S') # 393| { # 394| if (*p1 != '0') Error: GCC_ANALYZER_WARNING (CWE-457): libunistring-1.1/lib/uniname/uniname.c: scope_hint: In function ‘unicode_name_character’ libunistring-1.1/lib/uniname/uniname.c:392:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buf[1]’ # 390| if (ptr >= buf + 3 && *p1++ == 'V') # 391| { # 392|-> if (*p1++ == 'S') # 393| { # 394| if (*p1 != '0') Error: GCC_ANALYZER_WARNING (CWE-131): libunistring-1.1/lib/uninorm/u16-normalize.c:46: included_from: Included from here. libunistring-1.1/lib/uninorm/u-normalize-internal.h: scope_hint: In function ‘u16_normalize’ libunistring-1.1/lib/uninorm/u-normalize-internal.h:344:29: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size # 342| { # 343| /* Return a non-NULL value. NULL means error. */ # 344|-> result = (UNIT *) malloc (1); # 345| if (result == NULL) # 346| { Error: GCC_ANALYZER_WARNING (CWE-457): libunistring-1.1/lib/unistr.h:227:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*(const uint8_t *)inptr' libunistring-1.1/lib/striconveh.c: scope_hint: In function 'utf8conv_carefully' libunistring-1.1/lib/striconveh.c:1186:1: note: in expansion of macro 'str_iconveh' libunistring-1.1/lib/striconveh.c:1204:11: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:1204:11: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:47:1: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'utf8conv_carefully' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:148:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'utf8conv_carefully' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:134:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'utf8conv_carefully' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:120:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'utf8conv_carefully' libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:106:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'utf8conv_carefully' libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:92:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'utf8conv_carefully' libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/c-strcaseeq.h:35:7: note: in expansion of macro 'c_isupper' libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro 'CASEEQ' libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function 'utf8conv_carefully' libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro 'CASEEQ' libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro 'STRCASEEQ' libunistring-1.1/lib/striconveh.c:1204:11: note: in expansion of macro 'iconveh_open' libunistring-1.1/lib/striconveh.c:1207:16: note: in expansion of macro 'str_cd_iconveh' libunistring-1.1/lib/striconveh.c:1207:16: note: in expansion of macro 'str_cd_iconveh' libunistring-1.1/lib/striconveh.c:1077:1: note: in expansion of macro 'str_cd_iconveh' # 225| u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n) # 226| { # 227|-> uint8_t c = *s; # 228| # 229| if (c < 0x80) Error: GCC_ANALYZER_WARNING (CWE-457): libunistring-1.1/lib/unistr.h:227:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*(const uint8_t *)inptr’ libunistring-1.1/lib/striconveh.c: scope_hint: In function ‘utf8conv_carefully’ libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘utf8conv_carefully’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:148:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘utf8conv_carefully’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:134:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘utf8conv_carefully’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:120:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘utf8conv_carefully’ libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:106:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘utf8conv_carefully’ libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:92:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘utf8conv_carefully’ libunistring-1.1/lib/c-strcaseeq.h:35:59: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/striconveh.c:66:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro ‘STRCASEEQ’ libunistring-1.1/lib/c-strcaseeq.h:162:7: note: in expansion of macro ‘CASEEQ’ libunistring-1.1/lib/c-strcaseeq.h: scope_hint: In function ‘utf8conv_carefully’ libunistring-1.1/lib/c-strcaseeq.h:35:29: note: in definition of macro ‘CASEEQ’ libunistring-1.1/lib/striconveh.c:81:7: note: in expansion of macro ‘STRCASEEQ’ # 225| u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n) # 226| { # 227|-> uint8_t c = *s; # 228| # 229| if (c < 0x80) Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u16-to-u8.c:29: included_from: Included from here. libunistring-1.1/lib/unistr.h:326:12: warning[core.NullDereference]: Array access (from variable 's') results in a null pointer dereference # 324| if (uc < 0x80 && n > 0) # 325| { # 326|-> s[0] = uc; # 327| return 1; # 328| } Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u32-to-u16.c:29: included_from: Included from here. libunistring-1.1/lib/unistr.h:348:12: warning[core.NullDereference]: Array access (from variable 's') results in a null pointer dereference # 346| if (uc < 0xd800 && n > 0) # 347| { # 348|-> s[0] = uc; # 349| return 1; # 350| } Error: GCC_ANALYZER_WARNING (CWE-131): libunistring-1.1/lib/unistr/u16-to-u32.c: scope_hint: In function ‘u16_to_u32’ libunistring-1.1/lib/unistr/u16-to-u32.c:113:33: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size # 111| { # 112| /* Return a non-NULL value. NULL means error. */ # 113|-> result = (DST_UNIT *) malloc (1); # 114| if (result == NULL) # 115| { Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u16-to-u8.c:109:13: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 107| } # 108| if (result == resultbuf && length > 0) # 109|-> memcpy ((char *) memory, (char *) result, # 110| length * sizeof (DST_UNIT)); # 111| result = memory; Error: GCC_ANALYZER_WARNING (CWE-688): libunistring-1.1/lib/unistr/u32-to-u16.c: scope_hint: In function 'u32_to_u16' libunistring-1.1/lib/unistr/u32-to-u16.c:103:13: warning[-Wanalyzer-null-argument]: use of NULL 'result' where non-null expected libunistring-1.1/lib/unistr/u32-to-u16.c:40:1: note: in expansion of macro 'FUNC' libunistring-1.1/lib/unistr/u32-to-u16.c:29: included_from: Included from here. <built-in>: note: argument 2 of '__builtin_memcpy' must be non-null # 101| } # 102| if (result == resultbuf && length > 0) # 103|-> memcpy ((char *) memory, (char *) result, # 104| length * sizeof (DST_UNIT)); # 105| result = memory; Error: GCC_ANALYZER_WARNING (CWE-688): libunistring-1.1/lib/unistr/u32-to-u16.c: scope_hint: In function ‘u32_to_u16’ libunistring-1.1/lib/unistr/u32-to-u16.c:103:13: warning[-Wanalyzer-null-argument]: use of NULL ‘result’ where non-null expected libunistring-1.1/lib/unistr/u32-to-u16.c:40:1: note: in expansion of macro ‘FUNC’ libunistring-1.1/lib/unistr/u32-to-u16.c:29: included_from: Included from here. <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 101| } # 102| if (result == resultbuf && length > 0) # 103|-> memcpy ((char *) memory, (char *) result, # 104| length * sizeof (DST_UNIT)); # 105| result = memory; Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u32-to-u16.c:103:13: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 101| } # 102| if (result == resultbuf && length > 0) # 103|-> memcpy ((char *) memory, (char *) result, # 104| length * sizeof (DST_UNIT)); # 105| result = memory; Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u32-to-u8.c:95:13: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 93| } # 94| if (result == resultbuf && length > 0) # 95|-> memcpy ((char *) memory, (char *) result, # 96| length * sizeof (DST_UNIT)); # 97| result = memory; Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u8-strchr.c:103:15: warning[deadcode.DeadStores]: Value stored to 's1' is never read # 101| case2_skip2: # 102| s++; # 103|-> s1 = s[1]; # 104| if (s[1] == 0) # 105| break; Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u8-strchr.c:156:15: warning[deadcode.DeadStores]: Value stored to 's2' is never read # 154| case3_skip3: # 155| s++; # 156|-> s2 = s[2]; # 157| if (s[2] == 0) # 158| break; Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u8-strchr.c:161:15: warning[deadcode.DeadStores]: Value stored to 's2' is never read # 159| case3_skip2: # 160| s++; # 161|-> s2 = s[2]; # 162| if (s[2] == 0) # 163| break; Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u8-strchr.c:224:15: warning[deadcode.DeadStores]: Value stored to 's3' is never read # 222| case4_skip4: # 223| s++; # 224|-> s3 = s[3]; # 225| if (s[3] == 0) # 226| break; Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u8-strchr.c:229:15: warning[deadcode.DeadStores]: Value stored to 's3' is never read # 227| case4_skip3: # 228| s++; # 229|-> s3 = s[3]; # 230| if (s[3] == 0) # 231| break; Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u8-strchr.c:234:15: warning[deadcode.DeadStores]: Value stored to 's3' is never read # 232| case4_skip2: # 233| s++; # 234|-> s3 = s[3]; # 235| if (s[3] == 0) # 236| break; Error: GCC_ANALYZER_WARNING (CWE-688): libunistring-1.1/lib/unistr/u8-to-u16.c: scope_hint: In function 'u8_to_u16' libunistring-1.1/lib/unistr/u8-to-u16.c:109:13: warning[-Wanalyzer-null-argument]: use of NULL 'result' where non-null expected libunistring-1.1/lib/unistr/u8-to-u16.c:40:1: note: in expansion of macro 'FUNC' libunistring-1.1/lib/unistr/u8-to-u16.c:29: included_from: Included from here. <built-in>: note: argument 2 of '__builtin_memcpy' must be non-null # 107| } # 108| if (result == resultbuf && length > 0) # 109|-> memcpy ((char *) memory, (char *) result, # 110| length * sizeof (DST_UNIT)); # 111| result = memory; Error: GCC_ANALYZER_WARNING (CWE-688): libunistring-1.1/lib/unistr/u8-to-u16.c: scope_hint: In function ‘u8_to_u16’ libunistring-1.1/lib/unistr/u8-to-u16.c:109:13: warning[-Wanalyzer-null-argument]: use of NULL ‘result’ where non-null expected libunistring-1.1/lib/unistr/u8-to-u16.c:40:1: note: in expansion of macro ‘FUNC’ libunistring-1.1/lib/unistr/u8-to-u16.c:29: included_from: Included from here. <built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null # 107| } # 108| if (result == resultbuf && length > 0) # 109|-> memcpy ((char *) memory, (char *) result, # 110| length * sizeof (DST_UNIT)); # 111| result = memory; Error: CLANG_WARNING: libunistring-1.1/lib/unistr/u8-to-u16.c:109:13: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 107| } # 108| if (result == resultbuf && length > 0) # 109|-> memcpy ((char *) memory, (char *) result, # 110| length * sizeof (DST_UNIT)); # 111| result = memory; Error: GCC_ANALYZER_WARNING (CWE-131): libunistring-1.1/lib/unistr/u8-to-u32.c: scope_hint: In function ‘u8_to_u32’ libunistring-1.1/lib/unistr/u8-to-u32.c:105:33: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size # 103| { # 104| /* Return a non-NULL value. NULL means error. */ # 105|-> result = (DST_UNIT *) malloc (1); # 106| if (result == NULL) # 107| { Error: CLANG_WARNING: libunistring-1.1/lib/uniwbrk/ulc-wordbreaks.c:89:34: warning[core.NullDereference]: Array access (from variable 'q') results in a null pointer dereference # 87| for (i = 0; i < n; i++) # 88| if (offsets[i] != (size_t)(-1)) # 89|-> p[i] = q[offsets[i]]; # 90| # 91| free (q); Error: CLANG_WARNING: libunistring-1.1/lib/unistdio/u16-u16-vasnprintf.c:58: included_from: Included from here. libunistring-1.1/lib/vasnprintf.c:2038:29: warning[deadcode.DeadStores]: Value stored to 'flags' is never read # 2036| /* "A negative field width is taken as a '-' flag # 2037| followed by a positive field width." */ # 2038|-> flags |= FLAG_LEFT; # 2039| width = -width; # 2040| } Error: CPPCHECK_WARNING (CWE-562): libunistring-1.1/tests/gettext.h:247: error[returnDanglingLifetime]: Returning pointer to local variable 'msg_ctxt_id' that will be invalid when returning. # 245| #endif # 246| if (found_translation) # 247|-> return translation; # 248| } # 249| return msgid; Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/tests/ialloc.h:51:37: warning[-Wanalyzer-malloc-leak]: leak of ‘ximalloc(s + 1)’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘ximalloc’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘ximalloc’ # 49| imalloc (idx_t s) # 50| { # 51|-> return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem (); # 52| } # 53| Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/tests/ialloc.h:51:37: warning[-Wanalyzer-malloc-leak]: leak of ‘ximalloc(s)’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘ximalloc’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘ximalloc’ # 49| imalloc (idx_t s) # 50| { # 51|-> return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem (); # 52| } # 53| Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/tests/ialloc.h:81:10: warning[-Wanalyzer-malloc-leak]: leak of ‘xicalloc(s, 1)’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘xicalloc’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘xicalloc’ # 79| s = 0; # 80| } # 81|-> return calloc (n, s); # 82| } # 83| Error: CLANG_WARNING: libunistring-1.1/tests/strerror_r.c:165:7: warning[deadcode.DeadStores]: Value stored to 'ret' is never read # 163| # 164| { # 165|-> ret = 0; # 166| # 167| # if HAVE___XPG_STRERROR_R Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘xmalloc’ libunistring-1.1/tests/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(n)’ libunistring-1.1/tests/xmalloc.c:22: included_from: Included from here. libunistring-1.1/tests/xmalloc.c:57:10: note: in expansion of macro ‘XNMALLOC’ libunistring-1.1/tests/xmalloc.c:57:10: note: in expansion of macro ‘XNMALLOC’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘xmalloc’ # 43| xmalloc (size_t s) # 44| { # 45|-> return nonnull (malloc (s)); # 46| } # 47| Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/tests/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc(s)’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘xmalloc’ # 43| xmalloc (size_t s) # 44| { # 45|-> return nonnull (malloc (s)); # 46| } # 47| Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘xcalloc’ libunistring-1.1/tests/xmalloc.c:298:10: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(s, 1)’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘xcalloc’ # 296| xcalloc (size_t n, size_t s) # 297| { # 298|-> return nonnull (calloc (n, s)); # 299| } # 300| Error: GCC_ANALYZER_WARNING (CWE-401): libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘xmemdup’ libunistring-1.1/tests/xmalloc.c:314:10: warning[-Wanalyzer-malloc-leak]: leak of ‘xmemdup(string, strlen(string) + 1)’ libunistring-1.1/tests/xmalloc.c: scope_hint: In function ‘xmemdup’ # 312| xmemdup (void const *p, size_t s) # 313| { # 314|-> return memcpy (xmalloc (s), p, s); # 315| } # 316|