common: Check parameters more rigorously.
authorNeal H. Walfield <neal@g10code.com>
Fri, 21 Aug 2015 07:35:09 +0000 (09:35 +0200)
committerNeal H. Walfield <neal@g10code.com>
Fri, 21 Aug 2015 12:21:00 +0000 (14:21 +0200)
* g10/parse-packet.c (dbg_copy_all_packets): Check that OUT is not
NULL.
(copy_all_packets): Likewise.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
g10/parse-packet.c

index 4ba9419..6f44efa 100644 (file)
@@ -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);