]> git.ipfire.org Git - thirdparty/vala.git/commit
glib-2.0: Fix potential null pointer dereference in string.joinv()
authorPhilip Withnall <withnall@endlessm.com>
Tue, 5 Dec 2017 11:59:32 +0000 (11:59 +0000)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 5 Dec 2017 13:11:01 +0000 (14:11 +0100)
commitfb005f46f772fcc8a149b6b538fca86036ed0c8d
treeb25a19cb1efe7247e6b776cc4b251d5e56ee3570
parent7091f4ed264a626e5e69556ec18c7c2ad261c3dd
glib-2.0: Fix potential null pointer dereference in string.joinv()

The logic in the ‘is the array null or empty’ check was disjunctive
rather than conjunctive. If (str_array == null), the condition would
have short-circuited and tried to evaluate str_array.length, which would
have crashed.

Coverity CID: #1462389 (spotted when scanning Tracker)

https://bugzilla.gnome.org/show_bug.cgi?id=791257
vapi/glib-2.0.vapi