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

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

parent 67ff867b
...@@ -804,6 +804,7 @@ packet(PseudoTcpSocket *self, guint32 seq, guint8 flags, ...@@ -804,6 +804,7 @@ 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;
if (data != NULL)
memcpy(buffer + HEADER_SIZE, data, len); 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>"
......
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