diff options
Diffstat (limited to 'libs/libcurl/src/md4.c')
| -rw-r--r-- | libs/libcurl/src/md4.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/libcurl/src/md4.c b/libs/libcurl/src/md4.c index 7aae719266..f48ea9987c 100644 --- a/libs/libcurl/src/md4.c +++ b/libs/libcurl/src/md4.c @@ -194,11 +194,9 @@ static int MD4_Init(MD4_CTX *ctx) static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
{
if(!ctx->data) {
- ctx->data = malloc(size);
- if(ctx->data) {
- memcpy(ctx->data, data, size);
+ ctx->data = Curl_memdup(data, size);
+ if(ctx->data)
ctx->size = size;
- }
}
}
|
