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:
Philip Withnall 2020-08-18 09:33:42 +01:00
parent b639687b60
commit 0caa00b349

View File

@ -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))