Package: rust-dmidecode / 1.0.0-2
Metadata
| Package | Version | Patches format |
|---|---|---|
| rust-dmidecode | 1.0.0-2 | 3.0 (quilt) |
Patch series
view the series file| Patch | File delta | Description |
|---|---|---|
| fix s390x.patch | (download) |
src/lib.rs |
17 17 + 0 - 0 ! |
fix endianness bugs on big-endian architectures (s390x)
The SMBIOS specification defines all multi-byte fields as little-endian.
The crate used unsafe ptr::read casts on #[repr(C,packed)] structs to
deserialise binary data, which reads fields in native byte order. This is
correct on little-endian hosts but produces wrong values on big-endian
hosts such as s390x, causing test failures and incorrect parsed output
.
Fix by applying u{16,32,64}::from_le() to every multi-byte field read
from a packed struct or via the generic read_bytes helper
|
| fix assert_eq import.patch | (download) |
src/lib.rs |
1 0 + 1 - 0 ! |
fix ambiguous assert_eq import in structure_strings test Drop pretty_assertions::assert_eq from the test that also imports std::prelude::v1::*, which causes an ambiguous name error. |
