Jason Molenda 62c747517c Check if null buffer handed to SBProcess::ReadMemory
Add a check for a null destination buffer in SBProcess::ReadMemory,
and return an error if that happens.  If a Python SB API script
tries to allocate a huge amount of memory, the malloc done by the
intermediate layers will fail and will hand a null pointer to
ReadMemory.  lldb will eventually crash trying to write in to that
buffer.

Also add a test that tries to allocate an impossibly large amount
of memory, and hopefully should result in a failed malloc and hitting
this error codepath.

Differential Revision: https://reviews.llvm.org/D143012
rdar://104846609
2023-02-07 14:16:04 -08:00
..
2022-07-20 09:09:19 -07:00
2022-02-23 14:25:59 +01:00
2022-11-16 15:51:26 -08:00
2022-08-02 16:55:33 -07:00