I am so confused: there is an initialization before the "if".
I think, i am very tired.
Sorry for the spam but i didn't see it during 3 hours.


Le 01/04/2010 14:46, Nicolas Dioli a écrit :
Hello,
i don't understand a part of the code when ppp wants check the peer's requested CIs and send appropriate response.
In function "lcp_reqci()" of "lcp.c".
I don't understand the condition:

 u_char *p;                  /* Pointer to next char to parse */
[...]
    if (l < 2 ||        /* Not enough data for CI header or */
        p[1] < 2 ||     /*  CI length too small or */
        p[1] > l) {     /*  CI length too big? */

the pointer *p is not initialized previously. So, ppp send a config reject to the modem and never check the incoming config info. Is this check important? Can i remove it? Is there an init to do ( memset, malloc)?

During my debug:
l=0x18
p: can't acess to memory



Ce message entrant est certifié sans virus connu.
Analyse effectuée par AVG - www.avg.fr
Version: 9.0.791 / Base de données virale: 271.1.1/2782 - Date: 03/31/10 
20:32:00



--
Nicolas Dioli
Etudiant ingénieur
AXUN SAS
Tél : +33 (0)6 78 18 53 12

_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to