Skip to content
Browse files

small fix/check

  • Loading branch information...
1 parent a4294d7 commit 96c32c202c60b5e055a0574fb1c8ff5027e16248 @albertz committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 DbPng.cpp
View
2 DbPng.cpp
@@ -136,6 +136,8 @@ static Return __readBlock(DbPngEntryReader& png, const std::string& data) {
return "block entry too small (before reading block height)";
png.blockList.blockHeight = valueFromRaw<uint8_t>(&data[offset]);
offset += sizeof(uint8_t);
+ if(png.blockList.blockHeight == 0)
+ return "block height invalid";
}
if(((data.size() - offset) % png.blockList.blockHeight) != 0)

0 comments on commit 96c32c2

Please sign in to comment.
Something went wrong with that request. Please try again.