From a0d6d682434852068fca1f6411dd130ebca366bb Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 21 Aug 2011 21:10:58 -0700 Subject: [PATCH] sysconf SetArayData use the minimum of the buffersize or the dataLength --- Source/Core/Common/Src/SysConf.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/Common/Src/SysConf.h b/Source/Core/Common/Src/SysConf.h index 119cc3c45a..fb9c775828 100644 --- a/Source/Core/Common/Src/SysConf.h +++ b/Source/Core/Common/Src/SysConf.h @@ -66,10 +66,9 @@ struct SSysConfEntry } bool SetArrayData(u8* buffer, u16 bufferSize) { - - if (buffer && bufferSize <= dataLength) + if (buffer) { - memcpy(data, buffer, bufferSize); + memcpy(data, buffer, min(bufferSize, dataLength)); return true; } return false;