This fixes crash on OpenBSD, as memcpy(3)'s behavior is undefined when source
and destination addresses overlap.
---
src/drv_maildir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/drv_maildir.c b/src/drv_maildir.c
index 045dd9c..98e1687 100644
--- a/src/drv_maildir.c
+++ b/src/drv_maildir.c
@@ -1464,7 +1464,7 @@ maildir_set_msg_flags( store_t *gctx, message_t *gmsg,
int uid ATTR_UNUSED, int
for (i = 0; i < as(Flags); i++) {
if ((p = strchr( s, Flags[i] ))) {
if (del & (1 << i)) {
- memcpy( p, p + 1, fl - (p - s)
);
+ memmove( p, p + 1, fl - (p - s)
);
fl--;
}
} else if (add & (1 << i)) {
--
2.3.4
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel