Changeset 8


Ignore:
Timestamp:
Nov 10, 2005, 4:50:04 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • fixed buffer overflows.
Location:
abuse/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/jmalloc.cpp

    r7 r8  
    886886{
    887887        char *reportpath;
    888         reportpath = (char *)jmalloc( strlen( get_save_filename_prefix() ) + strlen( filename ), "reportpath" );
     888        reportpath = (char *)jmalloc( strlen( get_save_filename_prefix() ) + strlen( filename ) + 1, "reportpath" );
    889889        sprintf( reportpath, "%s%s", get_save_filename_prefix(), filename );
    890890
  • abuse/trunk/src/light.cpp

    r4 r8  
    203203
    204204        char *lightpath;
    205         lightpath = (char *)jmalloc( strlen( get_save_filename_prefix() ) + 9, "lightpath" );
     205        lightpath = (char *)jmalloc( strlen( get_save_filename_prefix() ) + 9 + 1, "lightpath" );
    206206        sprintf( lightpath, "%slight.tbl", get_save_filename_prefix() );
    207207
Note: See TracChangeset for help on using the changeset viewer.