diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
commit | d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch) | |
tree | 0ebb0db416c157fcfde51a941185819dd12d51fd /src/dv/plugin_transport_dv.c | |
parent | 5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff) | |
download | gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip |
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/dv/plugin_transport_dv.c')
-rw-r--r-- | src/dv/plugin_transport_dv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c index 0c72cea3f..51d75330f 100644 --- a/src/dv/plugin_transport_dv.c +++ b/src/dv/plugin_transport_dv.c | |||
@@ -487,7 +487,7 @@ dv_plugin_send (void *cls, | |||
487 | box = GNUNET_malloc (sizeof (struct GNUNET_MessageHeader) + msgbuf_size); | 487 | box = GNUNET_malloc (sizeof (struct GNUNET_MessageHeader) + msgbuf_size); |
488 | box->type = htons (GNUNET_MESSAGE_TYPE_DV_BOX); | 488 | box->type = htons (GNUNET_MESSAGE_TYPE_DV_BOX); |
489 | box->size = htons (sizeof (struct GNUNET_MessageHeader) + msgbuf_size); | 489 | box->size = htons (sizeof (struct GNUNET_MessageHeader) + msgbuf_size); |
490 | memcpy (&box[1], msgbuf, msgbuf_size); | 490 | GNUNET_memcpy (&box[1], msgbuf, msgbuf_size); |
491 | msg = box; | 491 | msg = box; |
492 | } | 492 | } |
493 | GNUNET_DV_send (plugin->dvh, | 493 | GNUNET_DV_send (plugin->dvh, |