forked from osmocom/wireshark
2fb9c8244e
The code to read and skip btsnoop header was written in a way where it reads up to PACKET_LENGTH bytes of data, skips the header, then move rest of data back start of buffer. So far so good. The code then resets number of bytes used in buffer making it skip rest of all data read. Many times this works fine but only by luck. When there's no data transfers first recv call will always only return the header (sender side writes header separately right after accept). When data transfers are ongoing first recv call will return both header and data. Then initial data is lost but more importantly risk parsing data with invalid offset. Fix by reading btsnoop header separately from rest of data. Change-Id: Ie52c33f943d8b311e0cd5638ec1a7d4840e271b8 Reviewed-on: https://code.wireshark.org/review/26659 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org> |
||
---|---|---|
.. | ||
.editorconfig | ||
Makefile.am | ||
androiddump.c | ||
ciscodump.c | ||
extcap-base.c | ||
extcap-base.h | ||
randpktdump.c | ||
ssh-base.c | ||
ssh-base.h | ||
sshdump.c | ||
udpdump.c |