Skip to content

Commit

Permalink
proc: fix error: the address of ‘iso15924’ will never be NULL
Browse files Browse the repository at this point in the history
The `iso15924` variable is not actually a pointer.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Feb 25, 2024
1 parent a5c0b71 commit 91192b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion winsup/cygwin/fhandler/proc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2153,7 +2153,7 @@ format_proc_locale_proc (LPWSTR win_locale, DWORD info, LPARAM param)
if (!(cp2 = wcschr (cp + 2, L'-')))
return TRUE;
/* Otherwise, store in iso15924 */
if (iso15924)
if (cp2 - cp + 1 < ENCODING_LEN)
wcpcpy (wcpncpy (iso15924, cp, cp2 - cp), L";");
}
cp = wcsrchr (win_locale, L'-');
Expand Down

0 comments on commit 91192b1

Please sign in to comment.