regex-automata
regex-automata copied to clipboard
ByteOrder::read_uint looks incorrect for big endian
This code doesn't look correct for big endian:
https://github.com/BurntSushi/regex-automata/blob/8deb0dba13b72a2234830e08c1e6de2a1189bc8c/src/byteorder.rs#L37-L41
It always copies the bytes to the beginning of the 8-byte array, but then interprets them as whatever endianness is being used.
The byteorder crate copies bytes to the end for big endian.
(This issue came up in code review, not from hitting any actual bugs.)