summaryrefslogtreecommitdiff
path: root/xml2cmp
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-04-15 17:43:29 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-04-15 17:43:29 +0000
commitb3f6e480ce53ad8955339253cbfa66315ce89249 (patch)
treea00e2f16c0ee971496ce4a0b4d8bb6b458b5708a /xml2cmp
parent94570db56c74b09cd6bdcfb91060585b9ab35691 (diff)
INTEGRATION: CWS adc5 (1.7.24); FILE MERGED
2003/04/15 14:15:08 np 1.7.24.2: #107553# 2003/04/14 14:49:07 np 1.7.24.1: 107553
Diffstat (limited to 'xml2cmp')
-rw-r--r--xml2cmp/source/xcd/cr_index.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/xml2cmp/source/xcd/cr_index.cxx b/xml2cmp/source/xcd/cr_index.cxx
index e0ec753db901..1e0a2e3c3279 100644
--- a/xml2cmp/source/xcd/cr_index.cxx
+++ b/xml2cmp/source/xcd/cr_index.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cr_index.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: np $ $Date: 2002-08-08 16:08:13 $
+ * last change: $Author: hr $ $Date: 2003-04-15 18:43:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -185,16 +185,22 @@ void
Index::CreateHtmlFileName( char * o_sOutputHtml,
const ModuleDescription & i_rModule )
{
- strcpy( o_sOutputHtml, sOutputDirectory.str() );
+ if ( strlen(sOutputDirectory.str()) + strlen(i_rModule.ModuleName()) > 1000 )
+ {
+ strcpy( o_sOutputHtml, "too-long-filename.html"); // STRCPY SAFE HERE
+ return;
+ }
+
+ strcpy( o_sOutputHtml, sOutputDirectory.str() ); // STRCPY SAFE HERE
#ifdef WNT
- strcat(o_sOutputHtml, "\\");
+ strcat(o_sOutputHtml, "\\"); // STRCAT SAFE HERE
#elif defined(UNX)
- strcat(o_sOutputHtml, "/");
+ strcat(o_sOutputHtml, "/"); // STRCAT SAFE HERE
#else
#error WNT or UNX have to be defined.
#endif
- strcat( o_sOutputHtml, i_rModule.ModuleName() );
- strcat( o_sOutputHtml, ".html" );
+ strcat( o_sOutputHtml, i_rModule.ModuleName() ); // STRCAT SAFE HERE
+ strcat( o_sOutputHtml, ".html" ); // STRCAT SAFE HERE
}