- Sep 09, 2021
-
-
Roger Leigh authored
Fix -Wmemset-transposed-args warnings of clang++
-
Roger Leigh authored
XERCESC-2221: InMemMsgLoader::loadMsg(): fix memory leak when transcoding fails.
-
- Aug 27, 2021
-
-
Even Rouault authored
Fixes: xercesc/util/XMLChTranscoder.cpp:73:23: warning: setting buffer to a 'sizeof' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args] memset(charSizes, sizeof(XMLCh), countToDo); ^ xercesc/util/XMLChTranscoder.cpp:73:23: note: cast the second argument to 'int' to silence and xercesc/util/XMLUTF16Transcoder.cpp:114:23: warning: setting buffer to a 'sizeof' expression; did you mean to transpose the last two arguments? [-Wmemset-transposed-args] memset(charSizes, sizeof(UTF16Ch), countToDo); ^ xercesc/util/XMLUTF16Transcoder.cpp:114:23: note: cast the second argument to 'int' to silence 1 warning generated.
-
- Aug 26, 2021
-
-
Even Rouault authored
Seen with the IconvGNU transcoder when parsing "<aaa.xsdopengis.net/gml\x96". The reason is that XMLString::transcode(repText2, manager) throws a TranscodingException which causes the tmp1 string to leak. ``` 0 0x8791409 in operator new(unsigned int) /src/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:99:3 1 0xbd147f7 in xercesc_4_0::MemoryManagerImpl::allocate(unsigned int) gdal/xerces-c/src/xercesc/internal/MemoryManagerImpl.cpp:40:18 2 0xbe8c73e in xercesc_4_0::IconvGNULCPTranscoder::transcode(char const*, xercesc_4_0::MemoryManager*) gdal/xerces-c/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp:870:32 3 0xbc22ca2 in xercesc_4_0::XMLString::transcode(char const*, xercesc_4_0::MemoryManager*) gdal/xerces-c/src/xercesc/util/XMLString.cpp:621:25 4 0xbe8f4ad in xercesc_4_0::InMemMsgLoader::loadMsg(unsigned int, char16_t*, unsigned int, char const*, char const*, char const*, char const*, xercesc_4_0::MemoryManager*) gdal/xerces-c/src/xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.cpp:157:16 5 0xbc20175 in xercesc_4_0::XMLException::loadExceptText(xercesc_4_0::XMLExcepts::Codes, char const*, char const*, char const*, char const*) gdal/xerces-c/src/xercesc/util/XMLException.cpp:241:23 6 0xbc48bee in xercesc_4_0::UTFDataFormatException::UTFDataFormatException(char const*, unsigned long long, xercesc_4_0::XMLExcepts::Codes, char const*, char const*, char const*, char const*, xercesc_4_0::MemoryManager*) gdal/xerces-c/src/xercesc/util/UTFDataFormatException.hpp:31:1 7 0xbc4824e in xercesc_4_0::XMLUTF8Transcoder::transcodeFrom(unsigned char const*, unsigned int, char16_t*, unsigned int, unsigned int&, unsigned char*) gdal/xerces-c/src/xercesc/util/XMLUTF8Transcoder.cpp:182:13 8 0xbd27d7e in xercesc_4_0::XMLReader::xcodeMoreChars(char16_t*, unsigned char*, unsigned int) gdal/xerces-c/src/xercesc/internal/XMLReader.cpp:1926:34 9 0xbd271dd in xercesc_4_0::XMLReader::refreshCharBuffer() gdal/xerces-c/src/xercesc/internal/XMLReader.cpp:571:19 10 0xbd15c63 in xercesc_4_0::XMLReader::peekNextChar(char16_t&) gdal/xerces-c/src/xercesc/internal/XMLReader.hpp:767:14 11 0xbd15aaf in xercesc_4_0::ReaderMgr::peekNextChar() gdal/xerces-c/src/xercesc/internal/ReaderMgr.cpp:158:21 12 0xbd328da in xercesc_4_0::XMLScanner::scanProlog() gdal/xerces-c/src/xercesc/internal/XMLScanner.cpp:1241:45 13 0xbd31ef4 in xercesc_4_0::XMLScanner::scanFirst(xercesc_4_0::InputSource const&, xercesc_4_0::XMLPScanToken&) gdal/xerces-c/src/xercesc/internal/XMLScanner.cpp:549:9 14 0xbdadcff in xercesc_4_0::SAX2XMLReaderImpl::parseFirst(xercesc_4_0::InputSource const&, xercesc_4_0::XMLPScanToken&) gdal/xerces-c/src/xercesc/parsers/SAX2XMLReaderImpl.cpp:500:22 ```
-
- Aug 24, 2021
-
-
Roger Leigh authored
XERCESC-2219: XMLReader constructor: fix memory leak when refreshRawBuffer() throws
-
Roger Leigh authored
XERCESC-2218: CurlURLInputStream constructor: avoid memory leak
-
Roger Leigh authored
XERCESC-2217: ICUTranscoder::transcodeFrom(): fix read heap-buffer-overflow
-
- Aug 23, 2021
-
-
Even Rouault authored
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37529 on GDAL The backtrace of the exception that caused the memory leak was: ``` Catchpoint 1 (exception thrown), 0x00007ffff5547672 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) bt 0 0x00007ffff5547672 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6 1 0x00007ffff24447c4 in xercesc_4_0::PosixFileMgr::fileRead (this=<optimized out>, f=<optimized out>, byteCount=<optimized out>, buffer=<optimized out>, manager=0x5555556df730) at xercesc/util/FileManagers/PosixFileMgr.cpp:160 2 0x00007ffff24e6ec2 in xercesc_4_0::XMLReader::refreshRawBuffer (this=0x5555557e49f8) at xercesc/internal/XMLReader.cpp:1891 3 0x00007ffff24e70d4 in xercesc_4_0::XMLReader::XMLReader (this=0x5555557e49f8, pubId=<optimized out>, sysId=0x555555750920 u"/", streamToAdopt=0x55555574e838, from=<optimized out>, type=xercesc_4_0::XMLReader::Type_General, source=xercesc_4_0::XMLReader::Source_External, throwAtEnd=false, calculateSrcOfs=false, lowWaterMark=100, version=xercesc_4_0::XMLReader::XMLV1_0, manager=0x5555556df730) at xercesc/internal/XMLReader.cpp:130 4 0x00007ffff24ced75 in xercesc_4_0::ReaderMgr::createReader (this=this@entry=0x5555557896d8, src=..., refFrom=refFrom@entry=xercesc_4_0::XMLReader::RefFrom_NonLiteral, type=type@entry=xercesc_4_0::XMLReader::Type_General, source=source@entry=xercesc_4_0::XMLReader::Source_External, calcSrcOfs=false, lowWaterMark=100) at ./xercesc/sax/InputSource.hpp:314 5 0x00007ffff24cb0af in xercesc_4_0::IGXMLScanner::scanReset (this=0x555555789608, src=...) at xercesc/internal/IGXMLScanner2.cpp:1286 6 0x00007ffff24c36e9 in xercesc_4_0::IGXMLScanner::scanDocument (this=0x555555789608, src=...) at xercesc/internal/IGXMLScanner.cpp:198 7 0x00007ffff250abaf in xercesc_4_0::AbstractDOMParser::parse (this=0x7fffffffc2d0, source=...) at xercesc/parsers/AbstractDOMParser.cpp:545 8 0x00007ffff24cbdbe in xercesc_4_0::IGXMLScanner::resolveSchemaGrammar (this=0x555555792f78, loc=0x5555557dd694 u"/", uri=0x555555737180 u"`", ignoreLoadSchema=<optimized out>) at xercesc/internal/IGXMLScanner2.cpp:1895 0x00007ffff24cce7c in xercesc_4_0::IGXMLScanner::parseSchemaLocation (this=0x555555792f78, schemaLocationStr=<optimized out>, ignoreLoadSchema=false) at ./xercesc/framework/XMLBuffer.hpp:171 10 0x00007ffff24cd182 in xercesc_4_0::IGXMLScanner::scanRawAttrListforNameSpaces (this=this@entry=0x555555792f78, attCount=attCount@entry=9) at xercesc/internal/IGXMLScanner2.cpp:1649 11 0x00007ffff24c22cb in xercesc_4_0::IGXMLScanner::scanStartTagNS (this=0x555555792f78, gotData=@0x7fffffffc91f: true) at xercesc/internal/IGXMLScanner.cpp:2213 12 0x00007ffff24c3522 in xercesc_4_0::IGXMLScanner::scanContent (this=0x555555792f78) at xercesc/internal/IGXMLScanner.cpp:890 13 0x00007ffff24c3760 in xercesc_4_0::IGXMLScanner::scanDocument (this=0x555555792f78, src=...) at xercesc/internal/IGXMLScanner.cpp:217 14 0x00007ffff25158e3 in xercesc_4_0::SAX2XMLReaderImpl::parse (this=0x555555731828, source=...) at xercesc/parsers/SAX2XMLReaderImpl.cpp:409 ```
-
- Aug 18, 2021
-
-
Roger Leigh authored
ci: Travis uses XCode 12.5
-
Even Rouault authored
CurlURLInputStream constructor calls the readMore() method, which can throw exceptions. In that situation, the destructor is not called, which results in resource/memory leaks. To fix that, catch the exceptions, manually do the cleanup and rethrow the exceptions. Found by ossfuzz (locally)
-
- Aug 10, 2021
-
-
Roger Leigh authored
-
Even Rouault authored
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35373 When charsDecoded == 0, the line ``for (index = 0; index < charsDecoded - 1; index++)`` will cause to read out of bounds of fSrcOffsets, due to unsigned integer underflow rules.
-
- Jun 15, 2020
-
-
Roger Leigh authored
Version 4.0.0
-
Roger Leigh authored
-
Roger Leigh authored
-
- Jun 11, 2020
-
-
Roger Leigh authored
XERCESC-2209: Remove unused LSTRING feature test
-
Roger Leigh authored
-
- Jun 10, 2020
-
-
Roger Leigh authored
XERCESC-2110: Remove XERCES_NO_MATCHING_DELETE_OPERATOR
-
Roger Leigh authored
-
Roger Leigh authored
XERCESC-2200: Appveyor bug fix
-
- Jun 09, 2020
-
-
Roger Leigh authored
-
- Jun 06, 2020
-
-
Roger Leigh authored
-
- Jun 03, 2020
-
-
Roger Leigh authored
XERCESC-2201: Upgrade travis-ci
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
XERCESC-2141: Enable C++17, C++14 or C++11 when available
-
Roger Leigh authored
-
Roger Leigh authored
Use C++98 features and remove pre-Standard workarounds
-
Roger Leigh authored
XERCESC-2202: Update version to 3.3.0
-
- Jun 02, 2020
-
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
-
Roger Leigh authored
-