libimobiledevice / libimobiledevice-glue

A library with common code used by libraries and tools around the libimobiledevice project
GNU Lesser General Public License v2.1
91 stars 70 forks source link

Fixed issue with parsing packed structure. 32 and 64 bit packed value… #38

Closed cornejo closed 9 months ago

cornejo commented 10 months ago

Fixed issue with parsing packed structure. 32 and 64 bit packed values won't be parsed correctly due to bad pointer manipulation

cornejo commented 10 months ago

If you're after more supporting information. Please consider what happens in opack.c, line 472. The pointer p is never modified by opack_decode_obj because it's using (p)+=8 instead of (*p)+=8. This results in an infinite loop as it processes the same offset over and over

https://github.com/cornejo/libimobiledevice-glue/blob/master/src/opack.c#L472

nikias commented 9 months ago

202e8ec125af87c5bfa1d4ee401a42bc37f9d159