diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-04-12 16:07:41 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-04-12 16:07:53 +0200 |
commit | 3073720273bb45adc6d59f6dad0e43efa4e224fb (patch) | |
tree | 67a2cfadc55d4ea4d3a411b19025edbd30bde2b8 | |
parent | 9eb5b59d45924950f32c73018c820ee7d858df20 (diff) | |
download | gnutls-3073720273bb45adc6d59f6dad0e43efa4e224fb.tar.gz |
gnutls_packet_get: avoid null pointer dereference on NULL input
That is, still allow the function to handle a NULL packet
input but reset the data contents.
-rw-r--r-- | lib/record.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/record.c b/lib/record.c index b07769f495..ca181622c1 100644 --- a/lib/record.c +++ b/lib/record.c @@ -1450,6 +1450,7 @@ void gnutls_packet_get(gnutls_packet_t packet, gnutls_datum_t *data, unsigned ch if (data) { data->data = NULL; data->size = 0; + return; } } |