From 8fe2a2f9081c2b1c384bd007e3f43aecb69fdb6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 6 Mar 2005 16:37:55 +0000 Subject: [PATCH] fix decodeing, it processed to much data and thus returned the wrong length git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14621 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/hex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roken/hex.c b/lib/roken/hex.c index 208922d5b..41f77a2eb 100644 --- a/lib/roken/hex.c +++ b/lib/roken/hex.c @@ -89,7 +89,7 @@ hex_decode(const char *str, void *data, size_t len) if ((l + 1) / 2 > len) return -1; - for (i = 0; i < len; i++) + for (i = 0; i < l / 2; i++) p[i] = pos(str[i * 2]) << 4 | pos(str[(i * 2) + 1]); return i; }