tags 337116 patch
thanks

It's simple...

gen_rand_pass() is being asked to make a 10 character string plus a null 
terminator, and is being asked to stuff it in a 10 character array. In 
doing so, it corrupts the top value on the stack, which is usually the 
previous stack frame pointer. Hence, when this function returns, all the 
auto variables in main() are garbage.

--- apg.c~      2006-05-08 16:19:16.302543900 +0100
+++ apg.c       2006-05-08 16:19:37.919548274 +0100
@@ -662,7 +662,7 @@
 */
 char * crypt_passstring (const char *p)
 {
- char salt[10];
+ char salt[11];
  gen_rand_pass (salt, 10, 10, S_SL|S_CL|S_NB);
  return (crypt(p, salt));
 }

-- 
Paul Martin <[EMAIL PROTECTED]>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to