cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-3083942 ] Crash when globbing incorrect regex

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 08 Oct 2010 21:16:15 +0000

Bugs item #3083942, was opened at 2010-10-08 21:46
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3083942&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: client module
Group: crash
Status: Open
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Vlad Ureche (vladureche)
Assigned to: Daniel Stenberg (bagder)
Summary: Crash when globbing incorrect regex

Initial Comment:
When using the curly braces regex, if the second set of curly braces is not closed, curl segfaults. This does not happen when bash does the globbing. (see note1)

vlad@dslabpc34.epfl.ch:~/Desktop$ curl 'http://site.{one,two,three}.com{'
Segmentation fault (core dumped)

gdb stacktrace:
vlad_at_dslabpc34.epfl.ch:~/Desktop/curl-crash/curl-7.21.1$ gdb
GNU gdb (GDB) 7.1-ubuntu
[...]
(gdb) file src/.libs/curl
Reading symbols from /home/vlad/Desktop/curl-crash/curl-7.21.1/src/.libs/curl...done.
(gdb) run {}{
Starting program: /home/vlad/Desktop/curl-crash/curl-7.21.1/src/.libs/curl {}{
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
__strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:31
31 ../sysdeps/x86_64/multiarch/../strlen.S: No such file or directory.
        in ../sysdeps/x86_64/multiarch/../strlen.S
(gdb) bt
#0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:31
#1 0x000000000040ef8d in glob_next_url (glob=0x64d000) at urlglob.c:441
#2 0x000000000040d704 in operate (config=0x7fffffffdf20, argc=2, argv=0x7fffffffe358) at main.c:4779
#3 0x000000000040db04 in main (argc=2, argv=0x7fffffffe358) at main.c:5745

curl -V
curl 7.21.1 (x86_64-unknown-linux-gnu) libcurl/7.21.1 zlib/1.2.3.3
Protocols: dict file ftp http imap pop3 rtsp smtp telnet tftp
Features: IPv6 Largefile libz
and others (default curl package in 64-bit Ubuntu 10.04 and 32-bit Ubuntu 10.10 Release Candidate also crash)

Note1:
If you indicate the URL without the quotes, bash will do the globbing and curl will not crash:
vlad@dslabpc34.epfl.ch:~/Desktop$ curl http://site.{one,two,three}.com{
but this will crash:
vlad@dslabpc34.epfl.ch:~/Desktop$ curl 'http://site.{one,two,three}.com{'

Note2:
The second curly brace doesn't necessarily have to be the last character in the line:
vlad_at_dslabpc34.epfl.ch:~/Desktop/curl-crash/curl-7.21.1$ curl '{}{http://'
Segmentation fault (core dumped)

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-10-08 23:16

Message:
Thanks for the report, this problem is now fixed in the git repository.

To try it out, you either checkout/update your git clone:
http://curl.haxx.se/source.html

or you try tomorrow's daily snapshot: http://curl.haxx.se/snapshots/

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3083942&group_id=976
Received on 2010-10-08

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET