Skip to content

Commit

Permalink
decode: improve Invalid preview_size error
Browse files Browse the repository at this point in the history
with to/r13/from_autocad_r13/ROBOT.DWG. check against the obj->size
not some hardcoded too low limit.

But now this file fail with out of memory on outjson
  • Loading branch information
rurban committed Oct 21, 2023
1 parent 81afe4d commit 002b88c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common_entity_data.spec
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
FIELD_BLL (preview_size, 160);
}
#endif
if ((long)_ent->preview_size >= 0 && _ent->preview_size < 210210)
if ((long)_ent->preview_size >= 0 && _ent->preview_size < obj->size)
{
FIELD_BINARY (preview, _ent->preview_size, 310);
}
Expand Down

0 comments on commit 002b88c

Please sign in to comment.