]> git.ipfire.org Git - thirdparty/cups.git/commit
Fix undefined behavior regarding pData 228/head
authorAlfonso Gregory <83477269+AtariDreams@users.noreply.github.com>
Sat, 28 Aug 2021 16:04:53 +0000 (12:04 -0400)
committerAlfonso Gregory <83477269+AtariDreams@users.noreply.github.com>
Sat, 28 Aug 2021 16:04:53 +0000 (12:04 -0400)
commit44a7d20d502911a6e2562d0f973e87730fa15477
tree8a71f6196f742eb845a90e56583a190058cb1159
parent243e81a5fdfb2bf3e95c7e7580c5ba87de17aca7
Fix undefined behavior regarding pData

pData is a void pointer, and even though the address at request.pData[2] is being cast to that of a const UInt8 pointer, the request.pData has to be converted first BEFORE doing any pointer arithmetic. For this reason, it is best to write this it as a pointer sum, rather than an array.
backend/usb-darwin.c