From: Paul Mackerras Date: Sun, 21 May 2006 11:56:40 +0000 (+0000) Subject: Fix bug reported in PR#1302 - doing strtol on "E=..." X-Git-Tag: ppp-2.4.7~123 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;ds=sidebyside;h=d876c1a1fee8e78feac2c5b5928b39ac7eae1022;p=ppp.git Fix bug reported in PR#1302 - doing strtol on "E=..." Thanks to Daniel Weller for the patch. --- diff --git a/pppd/chap_ms.c b/pppd/chap_ms.c index e3dff96..75724c5 100644 --- a/pppd/chap_ms.c +++ b/pppd/chap_ms.c @@ -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. */