diff options
author | Stuart Reilly <rs576h@vyatta.att-mail.com> | 2019-06-28 16:12:42 +0100 |
---|---|---|
committer | Stuart Reilly <rs576h@vyatta.att-mail.com> | 2019-06-28 16:12:42 +0100 |
commit | ef1b8e36a043509bb7fcdcc4f356f2e04d6e6117 (patch) | |
tree | f6cbe582e81a9c21104af65aa1862ee7ba670fc5 /src/lib/protocols/btlib.c | |
parent | 79634a6789df2aedf59fb557699277563a8a4268 (diff) |
Fix potential NULL dref in btlib.c
Diffstat (limited to 'src/lib/protocols/btlib.c')
-rw-r--r-- | src/lib/protocols/btlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/btlib.c b/src/lib/protocols/btlib.c index 309a10717..71b4dff9a 100644 --- a/src/lib/protocols/btlib.c +++ b/src/lib/protocols/btlib.c @@ -423,7 +423,7 @@ const u_int8_t *bt_decode(const u_int8_t *b, size_t *l, int *ret, bt_parse_data_ int64_t d = 0; u_int8_t c; - if(*l == 0) return NULL; + if(!l || *l == 0) return NULL; if(cbd->level > BDEC_MAXDEPT) goto bad_data; c = *b++; (*l)--; if(c == 'i') { // integer |