mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ng_udp: fix NULL pointer check in ng_udp_calc_csum
This commit is contained in:
parent
adb028361a
commit
380c53c3e1
@ -208,7 +208,7 @@ int ng_udp_calc_csum(ng_pktsnip_t *hdr, ng_pktsnip_t *pseudo_hdr)
|
||||
{
|
||||
uint16_t csum;
|
||||
|
||||
if (hdr == NULL || hdr->next == NULL) {
|
||||
if ((hdr == NULL) || (pseudo_hdr == NULL)) {
|
||||
return -EFAULT;
|
||||
}
|
||||
if (hdr->type != NG_NETTYPE_UDP) {
|
||||
|
Loading…
Reference in New Issue
Block a user