diff options
| author | riastradh <riastradh@NetBSD.org> | 2014-03-18 14:28:37 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2014-03-18 14:28:37 +0000 |
| commit | e05b9c2d889362bdd8a6812a5cbef62de78fea3f (patch) | |
| tree | 15a0310c477f20f87a4ca8920fcee82fc2b2e2f9 /sys/dev | |
| parent | 750a794b313af04b9ec72c0d480a06780e888431 (diff) | |
Avoid undefined behaviour in shifts in endian decoding routines.
If int is 32-bit and p is a uint8_t *, then p[0] is promoted to int
and p[0] << 24 can shift a one into the sign bit of an int, which is
nasal demon territory.
Diffstat (limited to 'sys/dev')
0 files changed, 0 insertions, 0 deletions
