Skip to content

Commit

Permalink
psd: properly skip Pascal strings
Browse files Browse the repository at this point in the history
  • Loading branch information
qbnu committed Jun 4, 2024
1 parent 57ac9bc commit f571f15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/JPEGView/PSDWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ CJPEGImage* PsdReader::ReadImage(LPCTSTR strFileName, bool& bOutOfMemory)
unsigned short nResourceID = ReadUShortFromFile(hFile);

// Skip Pascal string (padded to be even length)
while (ReadUShortFromFile(hFile));
unsigned char nStringSize = ReadUCharFromFile(hFile) | 1;
SeekFile(hFile, nStringSize);

// Resource size
unsigned int nResourceSize = ReadUIntFromFile(hFile);
Expand Down

0 comments on commit f571f15

Please sign in to comment.