From 800b23847507ecf3868a8dbefa55c533e30efaff Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Thu, 21 Apr 2005 22:30:21 +0000 Subject: [PATCH] Bug 291029 reversed args to memcpy results in write to readonly memory [@ memcpy - CopyToLowerCase::write] r=dougt sr=roc a=asa --- intl/unicharutil/util/nsUnicharUtils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intl/unicharutil/util/nsUnicharUtils.cpp b/intl/unicharutil/util/nsUnicharUtils.cpp index dc30371803aa..a92035be608e 100644 --- a/intl/unicharutil/util/nsUnicharUtils.cpp +++ b/intl/unicharutil/util/nsUnicharUtils.cpp @@ -156,7 +156,7 @@ class CopyToLowerCase gCaseConv->ToLower(aSource, dest, len); else { NS_WARNING("No case converter: only copying"); - memcpy((void*)aSource, (void*)dest, len * sizeof(*aSource)); + memcpy(dest, aSource, len * sizeof(*aSource)); } mIter.advance(len); return len; @@ -242,7 +242,7 @@ class CopyToUpperCase gCaseConv->ToUpper(aSource, dest, len); else { NS_WARNING("No case converter: only copying"); - memcpy((void*)aSource, (void*)dest, len * sizeof(*aSource)); + memcpy(dest, aSource, len * sizeof(*aSource)); } mIter.advance(len); return len;