]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
solv_hex2bin: don't eat nibbles
authorMichael Schroeder <mls@suse.de>
Fri, 26 Feb 2016 12:40:28 +0000 (13:40 +0100)
committerMichael Schroeder <mls@suse.de>
Fri, 26 Feb 2016 12:40:28 +0000 (13:40 +0100)
src/util.c

index d611297e20c8d9e3f3a502c1d31e8a40670ab659..b2e917970116787b56de04c4ccce34140b648fa2 100644 (file)
@@ -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;