knoaman 2004/01/13 05:43:29
Modified: c/src/xercesc/util/Transcoders/Win32 Win32TransService.cpp
c/src/xercesc/util/Transcoders/Iconv390
Iconv390TransService.cpp
Log:
Fix wrong size of allocation
Revision Changes Path
1.18 +3 -3
xml-xerces/c/src/xercesc/util/Transcoders/Win32/Win32TransService.cpp
Index: Win32TransService.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/Win32/Win32TransService.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Win32TransService.cpp 6 Jan 2004 21:52:28 -0000 1.17
+++ Win32TransService.cpp 13 Jan 2004 13:43:29 -0000 1.18
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2000 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -989,7 +989,7 @@
}
else
{
- retVal = (XMLCh*) manager->allocate(sizeof(XMLCh*)); //new XMLCh[1];
+ retVal = (XMLCh*) manager->allocate(sizeof(XMLCh)); //new XMLCh[1];
retVal[0] = 0;
}
return retVal;
1.9 +3 -3
xml-xerces/c/src/xercesc/util/Transcoders/Iconv390/Iconv390TransService.cpp
Index: Iconv390TransService.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/Iconv390/Iconv390TransService.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Iconv390TransService.cpp 24 Dec 2003 15:24:15 -0000 1.8
+++ Iconv390TransService.cpp 13 Jan 2004 13:43:29 -0000 1.9
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2000 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2004 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -382,7 +382,7 @@
if (wLent >= gTempBuffArraySize)
wideCharBuf = allocatedArray = (wchar_t*) manager->allocate
(
- (wLent + 1) * sizeof(wLent + 1)
+ (wLent + 1) * sizeof(wchar_t)
);//new wchar_t[wLent + 1];
else
wideCharBuf = tmpWideCharArr;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]