depot/pkgs/by-name/xa/xar/patches/0018-Replace-memcpy-with-memmove-for-musl.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
770 B
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ivan Trubach <mr.trubach@icloud.com>
Date: Tue, 30 Jul 2024 17:29:06 +0300
Subject: [PATCH 18/19] Replace memcpy with memmove for musl
---
xar/lib/io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xar/lib/io.c b/xar/lib/io.c
index 64c69af..c962c4b 100644
--- a/xar/lib/io.c
+++ b/xar/lib/io.c
@@ -650,7 +650,7 @@ static int32_t flush_stream(xar_stream *stream) {
state->pending_buf = NULL;
} else if( state->pending_buf_size > len ) {
state->pending_buf_size -= len;
- memcpy(state->pending_buf, state->pending_buf + len, state->pending_buf_size);
+ memmove(state->pending_buf, state->pending_buf + len, state->pending_buf_size);
}
}
--
2.44.1