1
0
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:
Martine Lenders 2015-07-02 00:32:18 +02:00
parent adb028361a
commit 380c53c3e1

View File

@ -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) {