stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r647223 - /stdcxx/trunk/util/locale_stub.cpp
Date Fri, 11 Apr 2008 16:50:34 GMT
Author: vitek
Date: Fri Apr 11 09:50:14 2008
New Revision: 647223

URL: http://svn.apache.org/viewvc?rev=647223&view=rev
Log:

2008-04-11  Travis Vitek  <vitek@roguewave.com>

	STDCXX-751
	* util/locale_stub.cpp (main): Check pointer validity outside of
	strcpy argument list to avoid bogus cadvise warning.


Modified:
    stdcxx/trunk/util/locale_stub.cpp

Modified: stdcxx/trunk/util/locale_stub.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/locale_stub.cpp?rev=647223&r1=647222&r2=647223&view=diff
==============================================================================
--- stdcxx/trunk/util/locale_stub.cpp (original)
+++ stdcxx/trunk/util/locale_stub.cpp Fri Apr 11 09:50:14 2008
@@ -59,7 +59,10 @@
         slash = std::strrchr (cmdline, '\\');
     }
 
-    std::strcpy (slash ? slash + 1 : cmdline, localedef);
+    if (slash)
+        std::strcpy (slash + 1, localedef);
+    else
+        std::strcpy (cmdline, localedef);
 
     std::strcat (cmdline, " ");
     std::strcat (cmdline, argv_1);



Mime
View raw message