commit 0840026a4b41600ad74717bf7b26ab4185ed7121
Author: Dmitrij D. Czarkoff <[email protected]>
AuthorDate: Fri Apr 3 22:38:46 2015 +0200
Commit: Oswald Buddenhagen <[email protected]>
CommitDate: Sat Apr 4 10:46:14 2015 +0200
fix crash in maildir_set_msg_flags()
memcpy(3)'s behavior is undefined when source and destination addresses
overlap, and it actually crashed on OpenBSD. use memmove() instead.
src/drv_maildir.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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)) {
------------------------------------------------------------------------------
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