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:
Sergio Gelato 2020-07-08 12:45:43 +01:00 committed by Philip Withnall
parent 8049535ffe
commit 63b329fb81

View File

@ -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;
}