mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 11:42:10 +01:00
guri: Add an assertion to help static analysis
This might eliminate some false positives being thrown by Coverity to do with the return value of `uri_decoder()` and whether it’s allocated anything. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
b639687b60
commit
0caa00b349
@ -350,6 +350,7 @@ uri_decoder (gchar **out,
|
||||
*d = '\0';
|
||||
|
||||
len = d - decoded;
|
||||
g_assert (len >= 0);
|
||||
|
||||
if (!(flags & G_URI_FLAGS_ENCODED) &&
|
||||
!g_utf8_validate (decoded, len, &invalid))
|
||||
|
Loading…
x
Reference in New Issue
Block a user