Juan Lang : crypt32: Use memmove rather than memcpy when addresses might overlap.

Alexandre Julliard julliard at winehq.org
Fri Nov 2 08:10:19 CDT 2007


Module: wine
Branch: master
Commit: b9dae979a40f40a7fddd0669a2216fab0ae3feb1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b9dae979a40f40a7fddd0669a2216fab0ae3feb1

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Nov  1 09:45:49 2007 -0700

crypt32: Use memmove rather than memcpy when addresses might overlap.

---

 dlls/crypt32/cert.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index 5b45358..b3808ff 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -2123,7 +2123,7 @@ BOOL WINAPI CertGetValidUsages(DWORD cCerts, PCCERT_CONTEXT *rghCerts,
                             {
                                 if (j < validUsages.cUsageIdentifier - 1)
                                 {
-                                    memcpy(&validUsages.rgpszUsageIdentifier[j],
+                                    memmove(&validUsages.rgpszUsageIdentifier[j],
                                      &validUsages.rgpszUsageIdentifier[j +
                                      numRemoved + 1],
                                      (validUsages.cUsageIdentifier - numRemoved




More information about the wine-cvs mailing list