2012-08-27 17:26 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* harbour/src/rtl/fstemp.c
    ! added protection against possible buffer overflow
    * enable mkstemps() for GLIBC 2.12 and higher

  * harbour/src/compiler/harbour.y
    ! added missing ';' at the end of C code - newer bisons
      do not add them automatically
This commit is contained in:
Przemyslaw Czerpak
2012-08-27 15:27:12 +00:00
parent bc8bf71afd
commit 9d58ffd009
3 changed files with 25 additions and 11 deletions

View File

@@ -16,6 +16,15 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-08-27 17:26 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/src/rtl/fstemp.c
! added protection against possible buffer overflow
* enable mkstemps() for GLIBC 2.12 and higher
* harbour/src/compiler/harbour.y
! added missing ';' at the end of C code - newer bisons
do not add them automatically
2012-08-26 23:22 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbxbp/listbox.prg
+ Extended: method :addItem( cText, qImage ) in XbpListBox() class.

View File

@@ -1073,7 +1073,7 @@ CodeBlock : BlockHead
ExpList : Expression { $$ = hb_compExprNewList( $1, HB_COMP_PARAM ); }
| ExpList ',' Expression { $$ = hb_compExprAddListExpr( $1, $3 ); }
PareExpList : '(' ExpList ')' { $$ = $2 }
PareExpList : '(' ExpList ')' { $$ = $2; }
;
PareExpListAlias : PareExpList ALIASOP

View File

@@ -78,11 +78,14 @@
#if ( defined( HB_OS_LINUX ) && ( !defined( __WATCOMC__ ) || __WATCOMC__ >= 1280 ) ) || \
defined( HB_OS_BSD ) || defined( HB_OS_DARWIN ) || defined( HB_OS_SUNOS )
#define HB_HAS_MKSTEMP
#if ( defined( HB_OS_BSD ) && !defined( __NetBSD__ ) ) || \
defined( HB_OS_DARWIN )
#define HB_HAS_MKSTEMPS
#endif
# define HB_HAS_MKSTEMP
# if ( defined( HB_OS_BSD ) && !defined( __NetBSD__ ) ) || \
defined( HB_OS_DARWIN ) || \
( defined( HB_OS_LINUX ) && \
( defined( _BSD_SOURCE ) || defined( _SVID_SOURCE ) ) && \
( defined( __GLIBC_PREREQ ) && __GLIBC_PREREQ( 2, 12 ) ) )
# define HB_HAS_MKSTEMPS
# endif
#endif
#if !defined( HB_USE_LARGEFILE64 ) && defined( HB_OS_UNIX )
@@ -162,11 +165,12 @@ HB_FHANDLE hb_fsCreateTempEx( char * pszName, const char * pszDir, const char *
if( pszName[ 0 ] != '\0' )
{
int len = ( int ) strlen( pszName );
if( pszName[ len - 1 ] != HB_OS_PATH_DELIM_CHR )
iLen = ( int ) strlen( pszName );
if( pszName[ iLen - 1 ] != HB_OS_PATH_DELIM_CHR &&
iLen < HB_PATH_MAX - 1 )
{
pszName[ len ] = HB_OS_PATH_DELIM_CHR;
pszName[ len + 1 ] = '\0';
pszName[ iLen ] = HB_OS_PATH_DELIM_CHR;
pszName[ iLen + 1 ] = '\0';
}
}
@@ -174,7 +178,8 @@ HB_FHANDLE hb_fsCreateTempEx( char * pszName, const char * pszDir, const char *
hb_strncat( pszName, pszPrefix, HB_PATH_MAX - 1 );
iLen = ( int ) strlen( pszName );
if( iLen > ( HB_PATH_MAX - 1 ) - 6 )
if( iLen > ( HB_PATH_MAX - 1 ) - 6 -
( pszExt ? ( int ) strlen( pszExt ) : 0 ) )
{
fd = FS_ERROR;
break;