X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/6a681e6a16943fb363b5403e84272a1ddaccf28e..refs/pull/1034/head:/print-ether.c diff --git a/print-ether.c b/print-ether.c index 1b273e16..b1865d17 100644 --- a/print-ether.c +++ b/print-ether.c @@ -306,7 +306,10 @@ recurse: * Cut off the snapshot length to the end of the * payload. */ - nd_push_snaplen(ndo, p, length); + if (!nd_push_snaplen(ndo, p, length)) { + (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, + "%s: can't push snaplen on buffer stack", __func__); + } if (ndo->ndo_eflag) { ND_PRINT("802.3");