mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Fix possible output corruption in rjson
Was possible when translation service was adding a base64 encoded string with a length less than 1536 characters.
Introduced in commit c20b01e9e1
.
This commit is contained in:
parent
c20b01e9e1
commit
cc1937a3af
1 changed files with 1 additions and 1 deletions
|
@ -1303,7 +1303,7 @@ void rjsonwriter_raw(rjsonwriter_t *writer, const char *buf, int len)
|
|||
buf += add;
|
||||
if (writer->buf_num + len <= writer->buf_cap)
|
||||
{
|
||||
memcpy(writer->buf, buf, len);
|
||||
memcpy(writer->buf + writer->buf_num, buf, len);
|
||||
writer->buf_num += len;
|
||||
}
|
||||
else if (writer->io(buf, len, writer->user_data) != len)
|
||||
|
|
Loading…
Add table
Reference in a new issue