miniobject: don't modify memory if it's clearly not a valid miniobject
authorTim-Philipp Müller <tim@centricular.com>
Sat, 15 Jul 2017 10:54:18 +0000 (11:54 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 15 Jul 2017 10:57:43 +0000 (11:57 +0100)
commitea62c96b94272c974b2a92e6e4d2e759f14f3894
tree807e5ecfa658863f7df6636a50adab691e2d0f44
parentb37429c9954615f5d9ca19bcdacdb6baefec4633
miniobject: don't modify memory if it's clearly not a valid miniobject

Add back function guard that checks the refcount in a read-only
operation first, and bail out without modifying the passed-in
memory if it's clearly not a valid mini object. Otherwise we
probably cause more harm than good. We keep the second sanity
check based on the 'real refcount' at the time of the unref
around for now too.

https://bugzilla.gnome.org/show_bug.cgi?id=784383
gst/gstminiobject.c