Skip to content

xlibi18n/lcFile.c: avoid use of possibly-NULL pointer with strcpy

Alan Coopersmith requested to merge alanc/libx11:gcc-warnings into master

Fixes gcc warnings:

lcFile.c: In function ‘_XlcLocaleLibDirName’:
lcFile.c:708:5: warning: use of possibly-NULL ‘last_dir_name’ where
 non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
  708 |     strcpy (last_dir_name, dir_name);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Merge request reports