mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +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 c20b01e9e1472625e338b1c3a7e657e6ff20213c.
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…
x
Reference in New Issue
Block a user