validate-utils: Only modify structure fields that really need updates
authorEdward Hervey <edward@centricular.com>
Fri, 20 Aug 2021 07:22:28 +0000 (09:22 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 20 Aug 2021 07:22:28 +0000 (09:22 +0200)
commit1e1e9f21974c4657f882971e7a601564ebec2b99
treed045ab6ebd62886e8c63e75c8598da364ce3d69d
parentcdfa0778c7e7f7b76e431b9dabdb44679e8ebed2
validate-utils: Only modify structure fields that really need updates

This avoids memory corruption in users of that structure which
were (rightfullly) assuming static fields (such as name) wouldn't
change. Without this, they would be using strings which will have been freed in
the meantime.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/252>
validate/gst/validate/gst-validate-utils.c