Task #119280 - added.err

back to task #119280
download
Error: GCC_ANALYZER_WARNING (CWE-688):
parted-3.7/parted/strlist.c:368:25: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
parted-3.7/parted/strlist.c:354:1: enter_function: entry to 'str_list_convert'
parted-3.7/parted/strlist.c:361:27: branch_true: following 'true' branch (when 'walk' is non-NULL)...
parted-3.7/parted/strlist.c:362:21: branch_true: ...to here
parted-3.7/parted/strlist.c:362:20: branch_true: following 'true' branch...
parted-3.7/parted/strlist.c:363:39: branch_true: ...to here
parted-3.7/parted/strlist.c:363:39: call_function: calling 'wchar_to_str' from 'str_list_convert'
parted-3.7/parted/strlist.c:363:39: return_function: returning to 'str_list_convert' from 'wchar_to_str'
parted-3.7/parted/strlist.c:367:31: call_function: inlined call to 'rpl_realloc' from 'str_list_convert'
parted-3.7/parted/strlist.c:368:25: danger: argument 1 ('realloc(str,  max((long unsigned int)length, 1)) + (sizetype)pos') NULL where non-null expected
#  366|   
#  367|   			str = realloc (str, length);
#  368|-> 			strcpy (str + pos, tmp);
#  369|   
#  370|   			pos = length - 1;