aboutsummaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2015-08-21 07:35:09 +0000
committerNeal H. Walfield <[email protected]>2015-08-21 12:21:00 +0000
commit0143d5c1ca4d12ac252c14f01931f48131591065 (patch)
treed3e42954d552d7b5e9d6fbded00a2de47788728a /g10/parse-packet.c
parentcommon: Don't continuing processing on error. (diff)
downloadgnupg-0143d5c1ca4d12ac252c14f01931f48131591065.tar.gz
gnupg-0143d5c1ca4d12ac252c14f01931f48131591065.zip
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 <[email protected]>.
Diffstat (limited to '')
-rw-r--r--g10/parse-packet.c8
1 files changed, 8 insertions, 0 deletions
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);