diff options
author | Ladislav Zezula <zezula@volny.cz> | 2024-04-21 21:42:04 +0200 |
---|---|---|
committer | Ladislav Zezula <zezula@volny.cz> | 2024-04-21 21:42:04 +0200 |
commit | 4e09d09686df70efc1c16c2bb41f716c6ce4fca4 (patch) | |
tree | 9675cf5b58bf7e3c1af208e935f97de49ef4a9ec /src/SFileGetFileInfo.cpp | |
parent | b47bb8b1909e35e086cff00b64e1b0b60d68156f (diff) |
Fixed page fault from https://github.com/ladislav-zezula/StormLib/issues/343
Diffstat (limited to 'src/SFileGetFileInfo.cpp')
-rw-r--r-- | src/SFileGetFileInfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/SFileGetFileInfo.cpp b/src/SFileGetFileInfo.cpp index 20f5e75..5dd997d 100644 --- a/src/SFileGetFileInfo.cpp +++ b/src/SFileGetFileInfo.cpp @@ -428,6 +428,8 @@ bool WINAPI SFileGetFileInfo( return GetInfo(pvFileInfo, cbFileInfo, &dwInt32Value, sizeof(DWORD), pcbLengthNeeded);
case SFileInfoFileIndex:
+ if(hf->ha == NULL)
+ return GetInfo_ReturnError(ERROR_INVALID_PARAMETER);
dwInt32Value = (DWORD)(pFileEntry - hf->ha->pFileTable);
return GetInfo(pvFileInfo, cbFileInfo, &dwInt32Value, sizeof(DWORD), pcbLengthNeeded);
|