summaryrefslogtreecommitdiff
path: root/proto_ip_authentication_hdr.c
AgeCommit message (Expand)AuthorFilesLines
2013-06-13dissector: ip_auth_hdr: Fix possible null pointer dereferenceTobias Klauser1-2/+11
2013-05-12dissector: ip_authentication_hdr: Remove trailing whitespacesTobias Klauser1-2/+2
2013-03-15all: import netsniff-ng 0.5.8-rc0 sourceDaniel Borkmann1-0/+87
98da1'>patch) tree8ce81771a18b73cbb1fd45a349944a2c31350597 parent10560b9afc8abf349843dff88c45dd43223e803e (diff)
powerpc/pci: Fix endian bug in fixed PHB numbering
The recent commit 63a72284b159 ("powerpc/pci: Assign fixed PHB number based on device-tree properties"), added code to read a 64-bit property from the device tree, and if not found read a 32-bit property (reg). There was a bug in the 32-bit case, on big endian machines, due to the use of the 64-bit value to read the 32-bit property. The cast of &prop means we end up writing to the high 32-bit of prop, leaving the low 32-bits containing whatever junk was on the stack. If that junk value was non-zero, and < MAX_PHBS, we would end up using it as the PHB id. This results in users seeing what appear to be random PHB ids. Fix it by reading into a u32 property and then assigning that to the u64 value, letting the CPU do the correct conversions for us. Fixes: 63a72284b159 ("powerpc/pci: Assign fixed PHB number based on device-tree properties") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat