mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-02-02 19:41:05 +00:00
Fixed SDL_iconv_string() truncation when handling SDL_ICONV_E2BIG
(cherry picked from commit c369b900199f905c51edb372bd7780f67a544a8c)
This commit is contained in:
parent
a1dea11d32
commit
7c86d96e86
|
@ -837,7 +837,8 @@ char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inb
|
||||||
outbuf = string + (outbuf - oldstring);
|
outbuf = string + (outbuf - oldstring);
|
||||||
outbytesleft = stringsize - (outbuf - string);
|
outbytesleft = stringsize - (outbuf - string);
|
||||||
SDL_memset(outbuf, 0, 4);
|
SDL_memset(outbuf, 0, 4);
|
||||||
} break;
|
continue;
|
||||||
|
}
|
||||||
case SDL_ICONV_EILSEQ:
|
case SDL_ICONV_EILSEQ:
|
||||||
/* Try skipping some input data - not perfect, but... */
|
/* Try skipping some input data - not perfect, but... */
|
||||||
++inbuf;
|
++inbuf;
|
||||||
|
|
Loading…
Reference in a new issue