35 lines
819 B
Diff
35 lines
819 B
Diff
From 4cebb81db05fd9281a6d482adce25c93605ed5da Mon Sep 17 00:00:00 2001
|
|
From: Michael Schroeder <mls@suse.de>
|
|
Date: Fri, 26 Feb 2016 13:40:28 +0100
|
|
Subject: [PATCH 3/9] solv_hex2bin: don't eat nibbles
|
|
|
|
---
|
|
src/util.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/util.c b/src/util.c
|
|
index d611297..b2e9179 100644
|
|
--- a/src/util.c
|
|
+++ b/src/util.c
|
|
@@ -235,7 +235,7 @@ solv_hex2bin(const char **strp, unsigned char *buf, int bufl)
|
|
d = c - ('A' - 10);
|
|
else
|
|
break;
|
|
- c = *++str;
|
|
+ c = str[1];
|
|
d <<= 4;
|
|
if (c >= '0' && c <= '9')
|
|
d |= c - '0';
|
|
@@ -246,7 +246,7 @@ solv_hex2bin(const char **strp, unsigned char *buf, int bufl)
|
|
else
|
|
break;
|
|
buf[i] = d;
|
|
- ++str;
|
|
+ str += 2;
|
|
}
|
|
*strp = str;
|
|
return i;
|
|
--
|
|
2.5.0
|
|
|