dovecot-2.1: hex2dec(): Allow data to contain also lowercase hex...

dovecot at dovecot.org dovecot at dovecot.org
Mon Nov 21 23:28:26 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/38846458ef78
changeset: 13741:38846458ef78
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 21 23:26:18 2011 +0200
description:
hex2dec(): Allow data to contain also lowercase hex characters.

diffstat:

 src/lib/hex-dec.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r c89dec41ad69 -r 38846458ef78 src/lib/hex-dec.c
--- a/src/lib/hex-dec.c	Mon Nov 21 22:43:19 2011 +0200
+++ b/src/lib/hex-dec.c	Mon Nov 21 23:26:18 2011 +0200
@@ -28,6 +28,8 @@
 			value += data[i]-'0';
 		else if (data[i] >= 'A' && data[i] <= 'F')
 			value += data[i]-'A' + 10;
+		else if (data[i] >= 'a' && data[i] <= 'f')
+			value += data[i]-'a' + 10;
 		else
 			return 0;
 	}


More information about the dovecot-cvs mailing list