From 9c581432cb1fa212de771d7c752df87992f7056c Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Thu, 9 Dec 2010 12:13:22 +0100 Subject: [PATCH] Important bugfix for ntfs_mbstoucs_libntfscompat: Typo in memcpy operation led to the wrong data being copied! --- ntfsprogs/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntfsprogs/utils.h b/ntfsprogs/utils.h index 98df2b67..ce7281dc 100644 --- a/ntfsprogs/utils.h +++ b/ntfsprogs/utils.h @@ -141,7 +141,7 @@ static __inline__ int ntfs_mbstoucs_libntfscompat(const char *ins, if(tmpstr_len >= 0) { /* The extra character is the \0 terminator. */ - memcpy(*outs, ins, + memcpy(*outs, tmpstr, sizeof(ntfschar)*(tmpstr_len + 1)); }