Преглед изворни кода

Don't allow a negative cm_alloc_size to wreak havoc.

master
Richard Nyberg пре 19 година
родитељ
комит
eb85993c8c
1 измењених фајлова са 1 додато и 1 уклоњено
  1. +1
    -1
      btpd/content.c

+ 1
- 1
btpd/content.c Прегледај датотеку

@@ -362,7 +362,7 @@ cm_prealloc(struct torrent *tp, uint32_t piece)
{
struct content *cm = tp->cm;

if (cm_alloc_size == 0)
if (cm_alloc_size <= 0)
set_bit(cm->pos_field, piece);
else {
unsigned npieces = ceil((double)cm_alloc_size / tp->meta.piece_length);


Loading…
Откажи
Сачувај