Commit 2796330b authored by Youness Alaoui's avatar Youness Alaoui

Please coverity : check if data is not NULL before dereferencing it

parent 67ff867b
...@@ -1652,7 +1652,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair) ...@@ -1652,7 +1652,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
} }
if (cand_use) if (cand_use)
pair->nominated = controlling; pair->nominated = controlling;
if (uname_len > 0) { if (uname_len > 0) {
......
...@@ -804,7 +804,8 @@ packet(PseudoTcpSocket *self, guint32 seq, guint8 flags, ...@@ -804,7 +804,8 @@ packet(PseudoTcpSocket *self, guint32 seq, guint8 flags,
*((uint32_t *) (buffer + 20)) = htonl(priv->ts_recent); *((uint32_t *) (buffer + 20)) = htonl(priv->ts_recent);
priv->ts_lastack = priv->rcv_nxt; priv->ts_lastack = priv->rcv_nxt;
memcpy(buffer + HEADER_SIZE, data, len); if (data != NULL)
memcpy(buffer + HEADER_SIZE, data, len);
DEBUG (PSEUDO_TCP_DEBUG_VERBOSE, "<-- <CONV=%d><FLG=%d><SEQ=%d:%d><ACK=%d>" DEBUG (PSEUDO_TCP_DEBUG_VERBOSE, "<-- <CONV=%d><FLG=%d><SEQ=%d:%d><ACK=%d>"
"<WND=%d><TS=%d><TSR=%d><LEN=%d>", "<WND=%d><TS=%d><TSR=%d><LEN=%d>",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment