freebsd-ports/textproc/xerces-c2/files/patch-src-xercesc-util-Platforms-FreeBSD-FreeBSDPlatformUtils.cpp
Pav Lucistnik f6e0b91315 - Add patch for this problem:
The XMLPlatformUtils::openFile function opens files with fopen and
	passes it "r+" string as mode argument. This makes(according to
	fopen(3)) it try to open file for reading and writing while it
	should be opened for reading only. As a result you can't
	work with files not owned by you which is rather common case
	for dtd files.
- Raise PORTREVISION

PR:		ports/59499
Submitted by:	Konstantin Oznobihin <bork@rsu.ru>
Approved by:	maintainer
2004-01-02 20:12:37 +00:00

20 lines
813 B
C++

--- src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Wed Nov 12 20:32:33 2003
+++ src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp Wed Nov 12 20:31:16 2003
@@ -298,7 +298,7 @@
XMLExcepts::CPtr_PointerIsZero);
const char* tmpFileName = XMLString::transcode(fileName, fgMemoryManager);
ArrayJanitor<char> janText((char*)tmpFileName, fgMemoryManager);
- FileHandle retVal = (FileHandle)fopen( tmpFileName , "r+" );
+ FileHandle retVal = (FileHandle)fopen( tmpFileName , "r" );
return retVal;
}
@@ -307,7 +307,7 @@
if (fileName == NULL)
ThrowXML(XMLPlatformUtilsException,
XMLExcepts::CPtr_PointerIsZero);
- FileHandle retVal = (FileHandle)fopen( fileName , "r+" );
+ FileHandle retVal = (FileHandle)fopen( fileName , "r" );
return retVal;
}