mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00: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
@ -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…
Reference in New Issue
Block a user