From f18f3b4a3917c8d74186f535a30b4f9dffad7afb Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Tue, 14 Jan 2014 12:07:53 +0100 Subject: + Fixed cases with invalid block table size --- src/SFileGetFileInfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/SFileGetFileInfo.cpp') diff --git a/src/SFileGetFileInfo.cpp b/src/SFileGetFileInfo.cpp index 05bea29..52b6f0d 100644 --- a/src/SFileGetFileInfo.cpp +++ b/src/SFileGetFileInfo.cpp @@ -791,7 +791,7 @@ bool WINAPI SFileGetFileInfo( pcbLengthNeeded[0] = cbSrcFileInfo; // If the caller entered an output buffer, the output size must also be entered - if(pvSrcFileInfo != NULL && pvFileInfo != NULL && cbFileInfo != 0) + if(pvFileInfo != NULL && cbFileInfo != 0) { // Check if there is enough space in the output buffer if(cbSrcFileInfo <= cbFileInfo) @@ -800,6 +800,7 @@ bool WINAPI SFileGetFileInfo( { case SFILE_INFO_TYPE_DIRECT_POINTER: case SFILE_INFO_TYPE_ALLOCATED: + assert(pvSrcFileInfo != NULL); memcpy(pvFileInfo, pvSrcFileInfo, cbSrcFileInfo); break; @@ -809,6 +810,7 @@ bool WINAPI SFileGetFileInfo( break; case SFILE_INFO_TYPE_TABLE_POINTER: + assert(pvSrcFileInfo != NULL); *(void **)pvFileInfo = pvSrcFileInfo; pvSrcFileInfo = NULL; break; -- cgit v1.2.3