[Asterisk-cvs] asterisk/res res_crypto.c,1.16,1.16.2.1

russell at lists.digium.com russell at lists.digium.com
Sun Nov 14 21:19:54 CST 2004


Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv5366/res

Modified Files:
      Tag: v1-0
	res_crypto.c 
Log Message:
make valgrind less chatty about res_crypto (bug #2857)


Index: res_crypto.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_crypto.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -d -r1.16 -r1.16.2.1
--- res_crypto.c	18 Sep 2004 23:39:39 -0000	1.16
+++ res_crypto.c	15 Nov 2004 02:20:20 -0000	1.16.2.1
@@ -174,6 +174,7 @@
 	while(!feof(f)) {
 		/* Calculate a "whatever" quality md5sum of the key */
 		char buf[256];
+		memset(buf, 0, 256);
 		fgets(buf, sizeof(buf), f);
 		if (!feof(f)) {
 			MD5Update(&md5, buf, strlen(buf));
@@ -441,7 +442,7 @@
 static void crypto_load(int ifd, int ofd)
 {
 	struct ast_key *key, *nkey, *last;
-	DIR *dir;
+	DIR *dir = NULL;
 	struct dirent *ent;
 	int note = 0;
 	/* Mark all keys for deletion */




More information about the svn-commits mailing list