]> 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:06:05 +0000 (13:06 +0200)
commit47be21f5d99ca583c80418b7d57495a6d2b31a5f
tree923f9cea8ec8296b47c529dfc521743ca1fa8452
parent4c00ab4c4592955c3dee15d2b6a5fa7deea73057
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