diff options
author | Linus Nordberg <linus@nordu.net> | 2017-07-30 22:21:59 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2017-07-30 22:21:59 +0200 |
commit | 99758d2928588ad21742c2c767dba313173d1e8d (patch) | |
tree | 54460417c0eb6d93b0476468f19d331b5555d21f | |
parent | d9e2de1a0d2f60cdf153d7efc5e6563a4764573b (diff) |
Don't risk calling _validauth() with sec == NULL.
buf2radmsg() is never called with rqauth != NULL and secret == NULL
but let's protect against future callers.
coverity: 1449519
-rw-r--r-- | radmsg.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -308,7 +308,7 @@ struct radmsg *buf2radmsg(uint8_t *buf, uint8_t *secret, uint8_t *rqauth) { } } - if (rqauth && !_validauth(buf, rqauth, secret)) { + if (rqauth && secret && !_validauth(buf, rqauth, secret)) { debug(DBG_WARN, "buf2radmsg: Invalid auth, ignoring reply"); return NULL; } |