mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 17:56:17 +01:00
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.)
This commit is contained in:
parent
8049535ffe
commit
63b329fb81
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user