URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c675234adb90751c14e974da6fad60f14259e39e
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark
Commits:
c675234 by Guy Harris (guy@xxxxxxxxxxxx):
An SHB with a magic of 0x1A2B3C4D isn't necessarily little-endian.
If it's 0x1A2B3C4D, that means it has the same byte order as the
instruction set for which Wireshark was built[*]; if it's 0x4D3C2B1A, it
means it has the opposite byte order. (We assume no "middle-endian"
machines here; it's extremely unlikely that any of this code will ever
work on a PDP-11.)
Wireshark *does* work on big-endian machines (if there are any places
where it doesn't, those are bugs that must be fixed), so we can't assume
that "same byte order as our instruction set" means "little-endian".
[*]If, for example, you run a PowerPC binary under Rosetta, it'll act as
if big-endian is the native byte order, even though it's running on a
little-endian machine.
Change-Id: Ic438bd85c034f1fba276408ba30214d7078121d1
Reviewed-on: https://code.wireshark.org/review/14133
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
(cherry picked from commit 24aaddcf4342caa618acc2aed608981616248744)
Reviewed-on: https://code.wireshark.org/review/14134
Actions performed:
from 5e39136 For SHBs, always use the byte order from the byte-order magic.
adds c675234 An SHB with a magic of 0x1A2B3C4D isn't necessarily little-endian.
Summary of changes:
wiretap/pcapng.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)