Wireshark-commits: [Wireshark-commits] master 24aaddc: An SHB with a magic of 0x1A2B3C4D isn't nece
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=24aaddcf4342caa618acc2aed608981616248744
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
24aaddc 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>
Actions performed:
from 84ac392 For SHBs, always use the byte order from the byte-order magic.
adds 24aaddc 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(-)