]> git.ozlabs.org Git - ppp.git/commitdiff
Fix bug reported in PR#1302 - doing strtol on "E=..."
authorPaul Mackerras <paulus@samba.org>
Sun, 21 May 2006 11:56:40 +0000 (11:56 +0000)
committerPaul Mackerras <paulus@samba.org>
Sun, 21 May 2006 11:56:40 +0000 (11:56 +0000)
Thanks to Daniel Weller for the patch.

pppd/chap_ms.c

index e3dff968c038de706205bff8fb046778311eb28b..75724c514b0946ad24e7c06d52bcf3eff9eca996 100644 (file)
@@ -74,7 +74,7 @@
  *
  */
 
-#define RCSID  "$Id: chap_ms.c,v 1.35 2006/05/21 07:23:15 paulus Exp $"
+#define RCSID  "$Id: chap_ms.c,v 1.36 2006/05/21 11:56:40 paulus Exp $"
 
 #ifdef CHAPMS
 
@@ -390,7 +390,7 @@ chapms_handle_failure(unsigned char *inp, int len)
         * chapms[2]_verify_response.
         */
        if (!strncmp(p, "E=", 2))
-               err = strtol(p, NULL, 10); /* Remember the error code. */
+               err = strtol(p+2, NULL, 10); /* Remember the error code. */
        else
                goto print_msg; /* Message is badly formatted. */