Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The comparison of maxconns and num_connections was inverted, resulting in a buffer overflow. Debugging Session: gdb --args ./src/axel https://speed.hetzner.de/100MB.bin [...] Initializing download: https://speed.hetzner.de/100MB.bin File size: 104857600 bytes Program received signal SIGSEGV, Segmentation fault. 0x000055555555a81a in axel_divide (axel=0x55555556b410) at axel.c:853 853 axel->conn[i].currentbyte = seg_len * i; (gdb) p i $1 = 87 (gdb) p axel->conf->num_connections $2 = 1024 (gdb) bt #0 0x000055555555a81a in axel_divide (axel=0x55555556b410) at axel.c:853 #1 0x00005555555586e4 in axel_open (axel=0x55555556b410) at axel.c:317 #2 0x0000555555561bb4 in main (argc=2, argv=0x7fffffffe778) at text.c:379 Fixes: 5aac471 ("Fix request range calculation") Fixes: #205 [ismael: Added commit message] Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
- Loading branch information