Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Buffer overflow in big endian
  • Loading branch information
zooba committed Feb 7, 2024
commit 7b446485997c3d35db88c1c19bc03714132ee136
2 changes: 1 addition & 1 deletion Objects/longobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ PyLong_AsNativeBytes(PyObject* vv, void* buffer, size_t n, int endianness)
}
else {
memset(buffer, fill, n - sizeof(cv.b));
memcpy((char *)buffer + n - sizeof(cv.b), cv.b, n);
memcpy((char *)buffer + n - sizeof(cv.b), cv.b, sizeof(cv.b));
}
#endif
}
Expand Down