Procházet zdrojové kódy

Fix bug in benc_length. benc_first shouldn't be used here since it returns

NULL on empty lists or dictionaries. This could cause crashes.

Reported by Robert Jonsson.
master
Richard Nyberg před 18 roky
rodič
revize
8f4fde49ee
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      misc/benc.c

+ 1
- 1
misc/benc.c Zobrazit soubor

@@ -114,7 +114,7 @@ benc_length(const char *p)
case 'd':
case 'l':
blen = 2; // [l|d]...e
next = benc_first(p);
next = p + 1;
while (*next != 'e') {
size_t len = benc_length(next);
blen += len;


Načítá se…
Zrušit
Uložit