X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fwin32_capture.c;h=586181020d00a3153f059a1a145e8282700999eb;hb=ebe0206c700963ee0ace86cc55fca6570b03cac3;hp=a2d67976bc4ab5e3fcf6f979345dd880d654afd5;hpb=2412c8ed80e1283657c97d156061beac04849eb5;p=wimlib diff --git a/src/win32_capture.c b/src/win32_capture.c index a2d67976..58618102 100644 --- a/src/win32_capture.c +++ b/src/win32_capture.c @@ -154,9 +154,10 @@ win32_encrypted_export_cb(unsigned char *_data, void *_ctx, unsigned long len) } } else { size_t len_to_copy = min(len, ctx->bytes_remaining); - memcpy(ctx->read_prefix_ctx_or_buf, data, len_to_copy); + ctx->read_prefix_ctx_or_buf = mempcpy(ctx->read_prefix_ctx_or_buf, + data, + len_to_copy); ctx->bytes_remaining -= len_to_copy; - ctx->read_prefix_ctx_or_buf += len_to_copy; } return ERROR_SUCCESS; }