]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ether.c
Makefile.in: don't remove configure and config.h.in in make distclean.
[tcpdump] / print-ether.c
index 1b273e16d0c5e41a6a72759dc8838fa5161631b7..b1865d17914d4517dee021cb4f11a7fa8ce585b0 100644 (file)
@@ -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");