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/ats/plugin_ats_ril.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/ats/plugin_ats_ril.c')
-rw-r--r-- | src/ats/plugin_ats_ril.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ats/plugin_ats_ril.c b/src/ats/plugin_ats_ril.c index 766a9936d..eac62c440 100644 --- a/src/ats/plugin_ats_ril.c +++ b/src/ats/plugin_ats_ril.c | |||
@@ -2089,8 +2089,8 @@ ril_cut_from_vector (void **old, | |||
2089 | else | 2089 | else |
2090 | { | 2090 | { |
2091 | tmpptr = GNUNET_malloc (size); | 2091 | tmpptr = GNUNET_malloc (size); |
2092 | memcpy (tmpptr, oldptr, bytes_before); | 2092 | GNUNET_memcpy (tmpptr, oldptr, bytes_before); |
2093 | memcpy (tmpptr + bytes_before, oldptr + (bytes_before + bytes_hole), bytes_after); | 2093 | GNUNET_memcpy (tmpptr + bytes_before, oldptr + (bytes_before + bytes_hole), bytes_after); |
2094 | } | 2094 | } |
2095 | if (NULL != *old) | 2095 | if (NULL != *old) |
2096 | { | 2096 | { |