Re: [lwip-users] Potential NULL pointer access in ip4_frag.c

2017-04-27 Thread Andreas Dinter
Thanks for your response. > Not having access to that specific version of LwIP The line is actually part of the latest stable version (2.0.2). It just moved a few lines up: https://git.savannah.gnu.org/cgit/lwip.git/tree/src/core/ipv4/ip4_frag.c?h=S TABLE-2_0_2_RELEASE_VER#n322 > The only

Re: [lwip-users] Potential NULL pointer access in ip4_frag.c

2017-04-26 Thread goldsi...@gmx.de
Patrick Klos wrote: (I think if LWIP_ASSERT was enabled, the code generated by the macro expansion would be enough to stop the warning, at least for 'prev'?) Exactly. And honestly, I'm not sure if it makes sense to enable "-Wnull-dereference" with asserts disabled. You enable half of the

Re: [lwip-users] Potential NULL pointer access in ip4_frag.c

2017-04-26 Thread Patrick Klos
On 4/26/2017 3:31 AM, Andreas Dinter wrote: Potential NULL pointer access in ip4_frag.c Hi, When compiling ip4_frag.c with GCC option -Wnull-dereference, it complains with the following warning. ../../../lwIp/src/core/ipv4/ip4_frag.c:327:16: warning: potential null pointer dereference

Re: [lwip-users] Potential NULL pointer access in ip4_frag.c

2017-04-26 Thread Simon Goldschmidt
Andreas Dinter wrote: >   ../../../lwIp/src/core/ipv4/ip4_frag.c:327:16: warning: potential null > pointer dereference [-Wnull-dereference] > This refers to this line: prev->next = ipr->next; As far as I can tell, that line does not match any released versions of lwIP. > In function:    

[lwip-users] Potential NULL pointer access in ip4_frag.c

2017-04-26 Thread Andreas Dinter
Hi, When compiling ip4_frag.c with GCC option -Wnull-dereference, it complains with the following warning. ../../../lwIp/src/core/ipv4/ip4_frag.c:327:16: warning: potential null pointer dereference [-Wnull-dereference] This refers to this line: prev->next = ipr->next; In function: