[pkg-opensc-commit] [opensc] 109/295: hex_to_bin: don't strip leading null-bytes

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit 51c27f57a08b95257b0642757f0a214daa037d85
Author: Frank Morgner <frankmorgner at gmail.com>
Date:   Sun Oct 16 20:31:21 2016 +0200

    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
---
 src/tools/pkcs11-tool.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/tools/pkcs11-tool.c b/src/tools/pkcs11-tool.c
index c28f686..b22eb95 100644
--- a/src/tools/pkcs11-tool.c
+++ b/src/tools/pkcs11-tool.c
@@ -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') {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list