Merge pull request #349 from dragos-oancea/spandsp-at-nullptr

[spandsp] scan-build: Dereference of null pointer - at_put_response()
This commit is contained in:
Andrey Volk 2020-02-14 01:08:40 +04:00 committed by GitHub
commit 8044d5a6e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,6 +217,8 @@ SPAN_DECLARE(void) at_set_at_rx_mode(at_state_t *s, int new_mode)
SPAN_DECLARE(void) at_put_response(at_state_t *s, const char *t)
{
uint8_t buf[3];
if (!s) return;
buf[0] = s->p.s_regs[3];
buf[1] = s->p.s_regs[4];