Closed zmw12306 closed 1 year ago
should check i+2 > bodylen
Thanks, fixed in 417024f
When receive truncate packet, can consider directly return error.
Yes, that would be a reasonable thing to do. What we do now is that we act upon the uncorrupted part of the packet. I don't think it matters much.
https://github.com/jech/babeld/blob/b20b3d2afe10d2ad77ec9fd9e676f683590d00d4/message.c#L451 should check i+2 > bodylen
Also, https://github.com/jech/babeld/blob/b20b3d2afe10d2ad77ec9fd9e676f683590d00d4/message.c#L618 When receive truncate packet, can consider directly return error.
Thanks