Skip to content

Commit b9acfbd

Browse files
committed
Handle null ptr direct lists
1 parent 29ec301 commit b9acfbd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/cpp/scalgoproto.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ class DirectListIn : public In {
734734
const std::uint32_t item_size_;
735735

736736
static std::uint32_t parse_header(const Reader * reader, Ptr p) {
737+
if (p.start == 0)
738+
return 1;
737739
if (p.start + 8 > reader->data + reader->size)
738740
throw OutOfBoundsError();
739741
std::uint32_t magic, item_size;

0 commit comments

Comments
 (0)