Browse Source

Reserved too few space to hold all data for a memdebug

dynamic-accesslists
erdgeist 18 years ago
parent
commit
e7f6908fb2
  1. 2
      trackerlogic.c

2
trackerlogic.c

@ -339,7 +339,7 @@ size_t return_memstat_for_tracker( char **reply ) { @@ -339,7 +339,7 @@ size_t return_memstat_for_tracker( char **reply ) {
torrent_count += torrents_list->size;
}
if( !( r = *reply = malloc( 256*32 + 64*torrent_count ) ) ) return 0;
if( !( r = *reply = malloc( 256*32 + (43+3+30)*torrent_count ) ) ) return 0;
for( i=0; i<256; ++i )
r += sprintf( r, "%02X: %08X %08X\n", i, (ot_dword)all_torrents[i].size, (ot_dword)all_torrents[i].space );

Loading…
Cancel
Save