From: Francois-Xavier Le Bail Date: Tue, 19 Jul 2016 12:37:47 +0000 (+0200) Subject: RESP: Fix Coverity warnings X-Git-Tag: tcpdump-4.8.0~2 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/978b1f72d977179c8757175f4805cabbf7e0fa42 RESP: Fix Coverity warnings The warnings were: Calling "fn_printn" without checking return value (as is done elsewhere 52 out of 56 times) --- diff --git a/print-resp.c b/print-resp.c index 0aa3d69e..5e36edaf 100644 --- a/print-resp.c +++ b/print-resp.c @@ -141,7 +141,8 @@ static int resp_print_inline(netdissect_options *, register const u_char *, int) */ #define RESP_PRINT_SEGMENT(_ndo, _bp, _len) \ ND_PRINT((_ndo, " \"")); \ - fn_printn(_ndo, _bp, _len, _ndo->ndo_snapend); \ + if (fn_printn(_ndo, _bp, _len, _ndo->ndo_snapend)) \ + goto trunc; \ fn_print_char(_ndo, '"'); void