[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] make base16_encode() fail more obviously when it fails
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common
Modified Files:
crypto.c
Log Message:
make base16_encode() fail more obviously when it fails
Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- crypto.c 2 Jul 2004 23:40:03 -0000 1.96
+++ crypto.c 21 Jul 2004 22:33:26 -0000 1.97
@@ -1438,8 +1438,7 @@
const char *end;
char *cp;
- if (destlen < srclen*2+1)
- return -1;
+ tor_assert(destlen >= srclen*2+1)
cp = dest;
end = src+srclen;