{
guchar *res;
- gsize olen = 0, i, allocated_len = inlen * 5 / 8 + 2;
+ gsize allocated_len = inlen * 5 / 8 + 2;
+ gint olen;
res = g_malloc (allocated_len);
const guchar *p;
static const gchar hexdigests[16] = "0123456789abcdef";
- end = out + end;
+ end = out + outlen;
o = out;
p = in;
-
while (inlen > 0 && o < end - 1) {
*o++ = hexdigests[((*p >> 4) & 0xF)];
*o++ = hexdigests[((*p++) & 0xF)];
}
gint
-rspamd_decode_hex_buf (const gchar *in, gsize inlen, gsize inlen,
+rspamd_decode_hex_buf (const gchar *in, gsize inlen,
guchar *out, gsize outlen)
{
guchar *o, *end, ret;