You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by vi...@apache.org on 2008/04/11 18:50:34 UTC
svn commit: r647223 - /stdcxx/trunk/util/locale_stub.cpp
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 <vi...@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);