mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-10 04:45:48 +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
|
else
|
||||||
*p++ = str[i];
|
*p++ = str[i];
|
||||||
}
|
}
|
||||||
*p++ = 0;
|
|
||||||
|
|
||||||
if (out_len)
|
if (out_len)
|
||||||
*out_len = p - unescaped_str;
|
*out_len = p - unescaped_str;
|
||||||
|
*p++ = 0;
|
||||||
|
|
||||||
*free_return = TRUE;
|
*free_return = TRUE;
|
||||||
return unescaped_str;
|
return unescaped_str;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user