I patched abi/src/af/xap/xp/xap_Frame.cpp to not use snprintf().
I really hate removing bounds-checking (although in this case it's
safe, if I understand what's going on). But, regretfully, snprintf()
is not portable. Ancient versions of HP-UX don't have a prototype
for it (although I think it's in libc), and there's a message from
Sam last November indicating PPC BeOS doesn't have it, either.
Thanks!
--
- Kevin Vajk
<[EMAIL PROTECTED]>
Index: abi/src/af/xap/xp/xap_Frame.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/xap/xp/xap_Frame.cpp,v
retrieving revision 1.62
diff -u -u -r1.62 xap_Frame.cpp
--- abi/src/af/xap/xp/xap_Frame.cpp 2001/03/24 17:21:03 1.62
+++ abi/src/af/xap/xp/xap_Frame.cpp 2001/03/27 02:19:12
@@ -695,10 +695,10 @@
{
const XAP_StringSet * pSS = m_app->getStringSet();
const char *szTmp = pSS->getValue(XAP_STRING_ID_UntitledDocument);
- int iLen = strlen(szTmp) + 5;
+ int iLen = strlen(szTmp) + 10;
char *szTmp2 = new char[iLen];
- snprintf(szTmp2, iLen, szTmp, m_iUntitled);
+ sprintf(szTmp2, szTmp, m_iUntitled);
oldName = szTmp2;
delete[] (szTmp2);
UT_DEBUGMSG(("Untitled. We will give it the name [%s]\n",
oldName.c_str()));