size_t changes for multibyte characters; fix for running debug trap in asynchronous pipeline; remove support for precomputed cache files for cross-compiling; more size_t and ssize_t changes to avoid overflow

This commit is contained in:
Chet Ramey
2024-06-28 14:16:29 -04:00
parent ad1f497a84
commit 5e28a1813c
20 changed files with 145 additions and 98 deletions
+2 -3
View File
@@ -1515,8 +1515,7 @@ asciicode (void)
register intmax_t ch;
#if defined (HANDLE_MULTIBYTE)
wchar_t wc;
size_t slen;
int mblength;
size_t slen, mblength;
#endif
DECLARE_MBSTATE;
@@ -1524,7 +1523,7 @@ asciicode (void)
slen = strlen (garglist->word->word+1);
wc = 0;
mblength = mbrtowc (&wc, garglist->word->word+1, slen, &state);
if (mblength > 0)
if (MB_INVALIDCH (mblength) == 0)
ch = wc; /* XXX */
else
#endif