]> git.ipfire.org Git - thirdparty/vala.git/commit
vala: Prevent usage of strlen() on non-null-terminated string
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 18 Oct 2023 11:06:05 +0000 (13:06 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 18 Oct 2023 11:47:40 +0000 (13:47 +0200)
commit3cd058c84ecc936c43c083280da10c361d6e224e
treeaa28aa944b0600d6cbeb57bfb61b35b4967348d1
parentd2ad5a05657738e4f9eb95105adc734e88272338
vala: Prevent usage of strlen() on non-null-terminated string

next_pos is not guaranteed to hold a null-terminated string.
Therefore g_str_has_prefix() can fail in strlen() and crash.

Based on patch by Daniel Kolesa

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1485
vala/valamarkupreader.vala