mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-27 12:35:26 +00:00
PPP, FSM, don't call memcpy with NULL even when size = 0
This commit is contained in:
parent
dc04118469
commit
b85b554db1
@ -787,7 +787,7 @@ void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen)
|
||||
}
|
||||
|
||||
outp = (u_char*)p->payload;
|
||||
/* if (datalen && data != outp + PPP_HDRLEN + HEADERLEN) -- was only for fsm_sconfreq() */
|
||||
if (datalen) /* && data != outp + PPP_HDRLEN + HEADERLEN) -- was only for fsm_sconfreq() */
|
||||
MEMCPY(outp + PPP_HDRLEN + HEADERLEN, data, datalen);
|
||||
MAKEHEADER(outp, f->protocol);
|
||||
PUTCHAR(code, outp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user