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 <[email protected]>
  • Loading branch information
dscho committed Feb 1, 2024
1 parent 4338d54 commit a1f8c18
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 a1f8c18

Please sign in to comment.