Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

axel 2.5 does not remember the value of LDFLAGS at configure time #1

Closed
ryandesign opened this issue Nov 13, 2015 · 1 comment
Closed

Comments

@ryandesign
Copy link

axel 2.5 remembers and uses the value of CFLAGS that the user set at configure time, but not the value of LDFLAGS.

This is sufficient to fix it:

--- configure.orig  2015-11-01 16:48:49.000000000 -0600
+++ configure   2015-11-13 10:11:08.000000000 -0600
@@ -236,6 +230,7 @@

 echo "CFLAGS+=${AXEL_CFLAGS}" >> Makefile.settings
 echo "LFLAGS+=${AXEL_LFLAGS}" >> Makefile.settings
+echo "LDFLAGS+=${LDFLAGS}" >> Makefile.settings

 echo 'Configuration done:'
 if [ "$i18n" = "1" ]; then

The Makefile is already written to use the LDFLAGS variable.

@eribertomota
Copy link
Collaborator

Hi,

I changed the build system to autotools and I18N is default now. So, this issue is solved. d7ac55b

Thanks!

Eriberto

ismaell pushed a commit that referenced this issue May 10, 2019
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants