video-frame: avoid possible out of bound memory access
authorCamilo Celis Guzman <camilo@pexip.com>
Mon, 18 Apr 2022 09:14:44 +0000 (18:14 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 19 Apr 2022 11:18:52 +0000 (11:18 +0000)
commitc4255f08f787ff6a41504b538fa4c2e911d40ec7
treeb265b3451fa9d34ab0bbfe639858feb669882bdf
parent0dd04764f715a1d9b33ef0e1a8b6043266b650eb
video-frame: avoid possible out of bound memory access

Although the components' initialization code would fill in -1 to all
unset components, make the code a bit more defensive and check for an
index bound first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2231>
subprojects/gst-plugins-base/gst-libs/gst/video/video-frame.c