Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.17.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Bug Fixes
- Bug in ``DataFrame.to_latex()`` produces an extra rule when ``header=False`` (:issue:`7124`)



- Bug in ``pandas.json`` when file to load is big (:issue:`11344`)
- Bugs in ``to_excel`` with duplicate columns (:issue:`11007`, :issue:`10982`, :issue:`10970`)
- Fixed a bug that prevented the construction of an empty series of dtype
``datetime64[ns, tz]`` (:issue:`11245`).
Expand Down
6 changes: 3 additions & 3 deletions pandas/src/ujson/lib/ultrajsondec.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds)

if (ds->escHeap)
{
if (newSize > (UINT_MAX / sizeof(wchar_t)))
if (newSize > (SIZE_MAX / sizeof(wchar_t)))
{
return SetError(ds, -1, "Could not reserve memory block");
}
Expand All @@ -458,8 +458,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds)
else
{
wchar_t *oldStart = ds->escStart;
ds->escHeap = 1;
if (newSize > (UINT_MAX / sizeof(wchar_t)))
if (newSize > (SIZE_MAX / sizeof(wchar_t)))
{
return SetError(ds, -1, "Could not reserve memory block");
}
Expand All @@ -468,6 +467,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds)
{
return SetError(ds, -1, "Could not reserve memory block");
}
ds->escHeap = 1;
memcpy(ds->escStart, oldStart, escLen * sizeof(wchar_t));
}

Expand Down