From 63b329fb818358eaf6688f4f78779ef3ee6cfb99 Mon Sep 17 00:00:00 2001 From: Sergio Gelato Date: Wed, 8 Jul 2020 12:45:43 +0100 Subject: [PATCH 0715/1095] glocalfileinfo: Correct an off-by-one error when unescaping hex Correct an off-by-one error in hex_unescape_string()'s computation of the output string length. (Turned into a git-format patch by Philip Withnall. Original patch submitted on the Debian bug tracker, bug#962912.) reason:Correct an off-by-one error when unescaping hex Conflict:NA Reference:https://github.com/GNOME/glib/commit/63b329fb818358eaf6688f4f78779ef3ee6cfb99 --- gio/glocalfileinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index 6cac187..4ca1ce6 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -394,10 +394,10 @@ hex_unescape_string (const char *str, else *p++ = str[i]; } - *p++ = 0; - if (out_len) *out_len = p - unescaped_str; + *p++ = 0; + *free_return = TRUE; return unescaped_str; } -- 1.8.3.1