citra-emu
/
citra-canary
Archived
1
0
Fork 0
This repository has been archived on 2024-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
citra-canary/src
Lioncash 6ed4431d8b file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
It's undefined behavior to pass a null pointer to std::fread and
std::fwrite, even if the length passed in is zero, so we must perform
the precondition checking ourselves.

A common case where this can occur is when passing in the data of an
empty std::vector and size, as an empty vector will typically have a
null internal buffer.

While we're at it, we can move the implementation out of line and add
debug checks against passing in nullptr to std::fread and std::fwrite.
2020-05-11 01:58:13 +02:00
..
android android: add logging 2019-03-09 18:23:32 -06:00
audio_core Merge branch 'master' into feature/savestates-2 2020-04-12 11:24:06 +01:00
citra Merge pull request #5083 from zhaowenlan1779/video-dumping-update 2020-04-03 21:15:32 -05:00
citra_qt Merge pull request #4908 from hamish-milne/feature/savestates-2 2020-04-17 21:52:51 +02:00
common file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero 2020-05-11 01:58:13 +02:00
core Merge pull request #4908 from hamish-milne/feature/savestates-2 2020-04-17 21:52:51 +02:00
dedicated_room Fix moderation by room host in dedicated rooms 2019-11-17 09:59:54 -05:00
input_common input_common/udp: Port various changes from yuzu (#5133) 2020-04-17 02:50:28 +02:00
network Merge branch 'master' into feature/savestates-2 2020-04-16 19:03:49 +01:00
tests clang format fixes etc. 2020-03-31 18:27:33 +01:00
video_core Merge branch 'master' into feature/savestates-2 2020-04-17 00:01:43 +01:00
web_service HTTP_C::Implement Context::MakeRequest (#4754) 2020-02-21 19:04:04 +01:00
.clang-format add java to .clang-format 2019-02-22 16:29:19 -06:00
CMakeLists.txt Code review actions (plus hopefully fix the linux CI) 2020-03-31 17:54:28 +01:00