hex_to_bin: don't strip leading null-bytes

fixes https://github.com/OpenSC/OpenSC/issues/838

... and hopefully doesn't have any side effects
This commit is contained in:
Frank Morgner 2016-10-16 20:31:21 +02:00
parent 83934db970
commit 51c27f57a0
1 changed files with 0 additions and 1 deletions

View File

@ -5346,7 +5346,6 @@ static int hex_to_bin(const char *in, unsigned char *out, size_t *outlen)
left = *outlen;
while (*in == '0' && *(++in) != '\0') ; // strip leading zeros in input
if (strlen(in) % 2)
nybbles = 1; // any leading zero in output should be in most-significant byte, not last one!
while (*in != '\0') {