]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[spandsp] scan-build: Dereference of null pointer - at_put_response() 349/head
authorDragos Oancea <dragos@signalwire.com>
Wed, 12 Feb 2020 22:20:28 +0000 (22:20 +0000)
committerDragos Oancea <dragos@signalwire.com>
Thu, 13 Feb 2020 20:57:39 +0000 (20:57 +0000)
libs/spandsp/src/at_interpreter.c

index 50f1df11d548b29a02ffa0ebde9d5b089a6ab9d5..8b95c48fa2a729fde8f6362b77fd37197cd00e47 100644 (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];