slayers: possible panic in the SerializeTo
with receiver of type Raw
#4094
Labels
bug
Something isn't working
SerializeTo
with receiver of type Raw
#4094
Hi :)
In the following excerpt, it seems to me that there is the implicit assumption that
len(s.Raw)
is at leastMetaLen
. Is this always true? if not, then it is possible that a panic occurs in the slicing operation (s.Raw[:MetaLen]
).scion/go/lib/slayers/path/scion/raw.go
Lines 52 to 56 in e4b728b
If this is indeed a problem, then the simplest solution seems to be to remove the slicing operation because
s.PathMeta.SerializeTo
already performs a bounds check before writing to the buffer passed as argument.The text was updated successfully, but these errors were encountered: