# HG changeset patch # User rathann # Date 1380838889 0 # Node ID 79921c6bb4e8442280fb51423600ac50247ced73 # Parent 323e54a7f200640afeb48a18a76e8d58e2491345 This is a heuristic to prevent segfaults when ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc is invalid but non-NULL. Patch by Fabian Keil #fk$fabiankeil%de^ diff -r 323e54a7f200 -r 79921c6bb4e8 searching.c --- a/searching.c Thu Oct 03 22:19:25 2013 +0000 +++ b/searching.c Thu Oct 03 22:21:29 2013 +0000 @@ -616,6 +616,10 @@ length = 0; for(i=0; ivts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc_start_byte >= ifo->vts_pgcit->last_byte) { + printerr("PGC start out of bounds"); + continue; + } pgc = ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc; if (pgc == NULL) { printerr("PGC missing.");