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/util/helper.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/util/helper.c')
-rw-r--r-- | src/util/helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/helper.c b/src/util/helper.c index ecfe4ccfa..cdb1b01d4 100644 --- a/src/util/helper.c +++ b/src/util/helper.c | |||
@@ -669,7 +669,7 @@ GNUNET_HELPER_send (struct GNUNET_HELPER_Handle *h, | |||
669 | mlen = ntohs (msg->size); | 669 | mlen = ntohs (msg->size); |
670 | sh = GNUNET_malloc (sizeof (struct GNUNET_HELPER_SendHandle) + mlen); | 670 | sh = GNUNET_malloc (sizeof (struct GNUNET_HELPER_SendHandle) + mlen); |
671 | sh->msg = (const struct GNUNET_MessageHeader*) &sh[1]; | 671 | sh->msg = (const struct GNUNET_MessageHeader*) &sh[1]; |
672 | memcpy (&sh[1], msg, mlen); | 672 | GNUNET_memcpy (&sh[1], msg, mlen); |
673 | sh->h = h; | 673 | sh->h = h; |
674 | sh->cont = cont; | 674 | sh->cont = cont; |
675 | sh->cont_cls = cont_cls; | 675 | sh->cont_cls = cont_cls; |