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:14:49 +0200 |
commit | 99111eba61151fa450f62cefab1a24237c63f184 (patch) | |
tree | 202902eea6165d555b024b6ef6727cc6a69951f1 | |
parent | 52dd79f7d4657218903783106562a82dcce7b9cc (diff) | |
download | gnutls-99111eba61151fa450f62cefab1a24237c63f184.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/gnutls_record.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index 422b491fcf..6428459363 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -1452,6 +1452,7 @@ void gnutls_packet_get(gnutls_packet_t packet, gnutls_datum_t *data, unsigned ch if (data) { data->data = NULL; data->size = 0; + return; } } |