tags: Don't allow image tags with G_MAXUINT32 length
authorSebastian Dröge <sebastian@centricular.com>
Tue, 13 Jun 2023 10:22:57 +0000 (13:22 +0300)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 20 Jun 2023 08:16:37 +0000 (09:16 +0100)
commit7bcd791fabe03b9ab1c72f494fc86cd0c06c3556
treed5537bb740f05e18dbee450129ed36e871e1834d
parentbdc8021c73c16c49d594579c606a4f4771a2670e
tags: Don't allow image tags with G_MAXUINT32 length

This will cause an integer overflow a little bit further down because we
allocate a bit more memory to allow for a NUL-terminator.

The caller should've avoided passing that much data in already as it's
not going to be a valid image and there's likely not even that much data
available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4897>
subprojects/gst-plugins-base/gst-libs/gst/tag/tags.c