[or-cvs] Fix buffer overlow when checking hashed passwords

Nick Mathewson nickm at seul.org
Sun Jun 5 14:28:49 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv10878/src/or

Modified Files:
	control.c 
Log Message:
Fix buffer overlow when checking hashed passwords

Index: control.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- control.c	23 May 2005 02:31:53 -0000	1.83
+++ control.c	5 Jun 2005 14:28:47 -0000	1.84
@@ -481,7 +481,7 @@
       }
   }
   if (buf)
-    memcpy(buf, decoded, sizeof(decoded));
+    memcpy(buf, decoded, S2K_SPECIFIER_LEN+DIGEST_LEN);
   return 0;
 }
 



More information about the tor-commits mailing list