lavv17/lftp — pull request #20 by ey3ball (2012-06-24 13:09:22+00:00)
Title: Fix segfault when using bm:site/path bookmarks in get/mirror commands

Test case:
* Create bookmark: bookmark add free ftp://ftp.free.fr
* Try to download file using bookmark :
lftp -c "get bm:free/mirrors/ftp.ubuntu.com/releases/10.04/ubuntu-10.04.4-alternate-amd64.iso

Result:
Application Segfaults

Fix:
Issue was due to a pointer (xstring) being assigned on the stack,
then assigned to new_url.
new_url is used later in the code, however since at that point the
original pointer is no longer in the scope, the referenced value
contains garbage.

Patch fixes the issue by moving the initial xtring in the same scope
than new_url