cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl-7.5.1: free() still causes segfaults (x86 linux)

From: kromJx <kromJx_at_crosswinds.net>
Date: Mon, 11 Dec 2000 19:24:24 +0000

Hi again,

The newly distributed version has not corrected the bug reported to
you in my earlier message.

The bug appears when the --remote-name option is used and occurs at

main.c:1495
        you increase the pointer to malloc'ed memory (++config->outfile)
        and then free(config->outfile). You are supposed to
        free memory using the original pointer to the malloc'ed memory, right?

Fixing this bug (using a temp char pointer for strrchr(), increasing it,
and then using it as the argument to strdup()) revealed yet another bug at

main.c:1478
        failure to check for outfiles having a NULL value causes a crash
        on my system.
        Please check the argument passed to all 'strdup()' calls for
        non-zero value

- J
Received on 2000-12-12