qtdemux: use unsigned int types to store result of QT_UINT32
authorJustin Chadwell <me@jedevc.com>
Wed, 2 Sep 2020 09:49:40 +0000 (10:49 +0100)
committerJustin Chadwell <me@jedevc.com>
Sun, 6 Nov 2022 12:00:31 +0000 (12:00 +0000)
commitfd96fc23c53dcd95becfcca06d471e92923265ab
treeacd51ddb48919b991925e69348912c5e88412b97
parent0405e0cfc7974cd9369747077fb388144e8bc4de
qtdemux: use unsigned int types to store result of QT_UINT32

In a few cases throughout qtdemux, the results of QT_UINT32 were being
stored in a signed integer, which could cause subtle bugs in the case of
an integer overflow, even allowing the the result to equal a negative
number!

This patch prevents this by simply storing the results of this function
call properly in an unsigned integer type. Additionally, we fix up the
length checking with stsd parsing to prevent cases of child atoms
exceeding their parent atom sizes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3344>
subprojects/gst-plugins-good/gst/isomp4/qtdemux.c