1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

Merge pull request #11164 from miri64/gnrc_sixlowpan_iphc/fix/check-NULL-ptr-for-compressible

gnrc_sixlowpan_iphc: check ptr != NULL in compressible check
This commit is contained in:
Martine Lenders 2019-03-26 17:49:10 +01:00 committed by GitHub
commit 116642f1de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -673,7 +673,7 @@ void gnrc_sixlowpan_iphc_send(gnrc_pktsnip_t *pkt, void *ctx, unsigned page)
dispatch = NULL; /* use dispatch as temporary pointer for prev */
/* determine maximum dispatch size and write protect all headers until
* then because they will be removed */
while (_compressible(ptr)) {
while ((ptr != NULL) && _compressible(ptr)) {
gnrc_pktsnip_t *tmp = gnrc_pktbuf_start_write(ptr);
if (tmp == NULL) {