mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Core: Add range checks to some helpers and similar.
This commit is contained in:
@@ -1263,7 +1263,7 @@ void notifyMatchingHandler(SceNetAdhocMatchingContext * context, ThreadMessage *
|
||||
MatchingArgs argsNew = { 0 };
|
||||
u32_le dataBufLen = msg->optlen + 8; //max(bufLen, msg->optlen + 8);
|
||||
u32_le dataBufAddr = userMemory.Alloc(dataBufLen); // We will free this memory after returning from mipscall. FIXME: Are these buffers supposed to be taken/pre-allocated from the memory pool during sceNetAdhocMatchingInit?
|
||||
uint8_t * dataPtr = Memory::GetPointerWrite(dataBufAddr);
|
||||
uint8_t *dataPtr = Memory::GetPointerWriteRange(dataBufAddr, dataBufLen);
|
||||
if (dataPtr) {
|
||||
memcpy(dataPtr, &msg->mac, sizeof(msg->mac));
|
||||
if (msg->optlen > 0)
|
||||
|
||||
Reference in New Issue
Block a user