You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sc...@apache.org on 2017/07/07 21:24:52 UTC

svn commit: r1801221 - /xerces/c/trunk/samples/src/PSVIWriter/PSVIWriter.cpp

Author: scantor
Date: Fri Jul  7 21:24:52 2017
New Revision: 1801221

URL: http://svn.apache.org/viewvc?rev=1801221&view=rev
Log:
XERCESC-2085 - Crash in PSVIWriter due to strrchr returning NULL

Modified:
    xerces/c/trunk/samples/src/PSVIWriter/PSVIWriter.cpp

Modified: xerces/c/trunk/samples/src/PSVIWriter/PSVIWriter.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/samples/src/PSVIWriter/PSVIWriter.cpp?rev=1801221&r1=1801220&r2=1801221&view=diff
==============================================================================
--- xerces/c/trunk/samples/src/PSVIWriter/PSVIWriter.cpp (original)
+++ xerces/c/trunk/samples/src/PSVIWriter/PSVIWriter.cpp Fri Jul  7 21:24:52 2017
@@ -264,7 +264,8 @@ int main(int argC, char* argV[])
 					if (strrchr(xmlFile, '\\')>strrchr(xmlFile, '/')) {
 						strcat(fileName, strrchr(xmlFile, '\\'));
 					} else {
-						strcat(fileName, strrchr(xmlFile, '/'));
+                        if (strrchr(xmlFile, '/'))
+                            strcat(fileName, strrchr(xmlFile, '/'));
 					}
 	                if (psviFormatter)
 	                	delete psviFormatter;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org