From 0143d5c1ca4d12ac252c14f01931f48131591065 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Fri, 21 Aug 2015 09:35:09 +0200 Subject: common: Check parameters more rigorously. * g10/parse-packet.c (dbg_copy_all_packets): Check that OUT is not NULL. (copy_all_packets): Likewise. -- Signed-off-by: Neal H. Walfield . --- g10/parse-packet.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/g10/parse-packet.c b/g10/parse-packet.c index 4ba941972..6f44efade 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -336,6 +336,10 @@ dbg_copy_all_packets (IOBUF inp, IOBUF out, const char *dbg_f, int dbg_l) { PACKET pkt; int skip, rc = 0; + + if (! out) + log_bug ("copy_all_packets: OUT may not be NULL.\n"); + do { init_packet (&pkt); @@ -351,6 +355,10 @@ copy_all_packets (IOBUF inp, IOBUF out) { PACKET pkt; int skip, rc = 0; + + if (! out) + log_bug ("copy_all_packets: OUT may not be NULL.\n"); + do { init_packet (&pkt); -- cgit v1.2.3