2008-06-28 10:44 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* tests/extend2.c
   * source/debug/dbgentry.c
   * contrib/hbodbc/odbc.c
   * contrib/hbw32/tprinter.c
   * contrib/hbziparch/hbziparc.c
   * contrib/hbziparch/hbzipnew.cpp
   * contrib/hbpgsql/postgres.c
     ! Changed strcpy() -> hb_strncpy()
     ! Changed strcat() -> hb_strncat()
     ! Some possible buffer overruns fixed along the way in hbziparch.lib
     ! Fixed some filename buffer sizes in hbziparch.lib
     ; TOFIX: There are still some remaining strcpy()/strcat() 
              calls in Harbour code:
              core: dbgentry.c, hbwince.c
              contrib: hbnf, hbw32, hbwhat32, hbtip
              foreign code: zlib, sqlite2/3
              Not all of these are necessarily bugs (but it's 
              difficult to know without checking each).
This commit is contained in:
Viktor Szakats
2008-06-28 08:52:56 +00:00
parent e7f78f1985
commit 1df6a97e6a
8 changed files with 93 additions and 74 deletions

View File

@@ -1043,6 +1043,7 @@ hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch )
PHB_ITEM pBlock;
BOOL bAfterId = FALSE;
char *s;
int buffsize;
watch->nVars = 0;
while ( watch->szExpr[ i ] )
@@ -1180,10 +1181,12 @@ hb_dbgEvalMakeBlock( HB_WATCHPOINT *watch )
i++;
}
s = ( char * ) ALLOC( 8 + strlen( watch->szExpr ) + 1 + 1 );
strcpy( s, "{|__dbg|" );
strcat( s, watch->szExpr );
strcat( s, "}" );
buffsize = 8 + strlen( watch->szExpr ) + 1;
s = ( char * ) ALLOC( buffsize + 1 );
hb_strncpy( s, "{|__dbg|", buffsize );
hb_strncat( s, watch->szExpr, buffsize );
hb_strncat( s, "}", buffsize );
pBlock = hb_itemNew( NULL );
if( ! hb_dbgEvalMacro( s, pBlock ) )