summaryrefslogtreecommitdiff
path: root/pixman/pixman-ppc.c
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@gmail.com>2021-03-16 12:25:01 +0000
committerAdam Jackson <ajax@redhat.com>2021-05-07 09:37:28 -0400
commite93eaff517567518696cac21203bbc5efdfee426 (patch)
tree531cba13004a1ce82877d5572d1e717bd16b500f /pixman/pixman-ppc.c
parentd93ec5713821106df6d57952dcf169308c7c4f0e (diff)
downloadpixman-e93eaff517567518696cac21203bbc5efdfee426.tar.gz
Avoid out-of-bounds read when accessing individual bytes from mask.
The important changes here are a handful of places where we replace memcpy(&m, mask++, sizeof(uint32_t)); or similar code with uint8_t m = *mask++; because we're only supposed to be reading a single byte from *mask, and accessing a 32-bit value may read out of bounds (besides that it reads values we don't actually want; whether this matters would depend exactly how the value in m is subsequently used). I've also changed a bunch of other places to use this same pattern (a local 8-bit variable) when reading individual bytes from the mask; the code was inconsistent about this, sometimes casting the byte to a uint32_t instead. This makes no actual difference, it just seemed better to use a consistent pattern throughout the file.
Diffstat (limited to 'pixman/pixman-ppc.c')
0 files changed, 0 insertions, 0 deletions