Skip to content

Commit

Permalink
Fixed SDL_iconv_string() truncation when handling SDL_ICONV_E2BIG
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jun 4, 2023
1 parent d406951 commit c369b90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stdlib/SDL_iconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,8 @@ char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inb
outbuf = string + (outbuf - oldstring);
outbytesleft = stringsize - (outbuf - string);
SDL_memset(outbuf, 0, 4);
} break;
continue;
}
case SDL_ICONV_EILSEQ:
/* Try skipping some input data - not perfect, but... */
++inbuf;
Expand Down

0 comments on commit c369b90

Please sign in to comment.