Philip Withnall 78da5faccb gvariant: Check offset table doesn’t fall outside variant bounds
When dereferencing the first entry in the offset table for a tuple,
check that it doesn’t fall outside the bounds of the variant first.

This prevents an out-of-bounds read from some non-normal tuples.

This bug was introduced in commit 73d0aa81c2575a5c9ae77d.

Includes a unit test, although the test will likely only catch the
original bug if run with asan enabled.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2840
oss-fuzz#54302
2022-12-21 19:50:19 +00:00
..
2022-07-05 11:06:49 +00:00
2022-07-25 22:30:22 +01:00
2010-07-10 23:56:45 -04:00
2022-09-15 03:43:04 +02:00
2010-07-05 23:43:47 -04:00
2018-12-17 16:19:31 -05:00
2011-02-13 23:49:19 -05:00
2013-11-23 00:39:07 -05:00
2010-07-07 22:03:02 -04:00
2011-01-27 23:07:53 -05:00
2022-12-15 23:50:23 +00:00