cURL / Mailing Lists / curl-library / Single Mail

curl-library

core drop in strequal.c

From: Savitha Perumal <savithap_at_yahoo-inc.com>
Date: Sat, 20 Jun 2009 11:08:25 -0700

Hi

We observed a core drop in the following location.

Program terminated with signal 11, Segmentation fault.
#0 0x212cf8f4 in strncasecmp () from /usr/lib/libc.so.4
(gdb) bt
#0 0x212cf8f4 in strncasecmp () from /usr/lib/libc.so.4
#1 0x22a8f988 in curl_strnequal (first=0x2 <Address 0x2 out of bounds>, second=0x22a9e7bf "User-Agent:", max=11) at strequal.c:69
#2 0x22a779ab in checkheaders (data=0x2886000, thisheader=0x22a9e7bf "User-Agent:") at http.c:172
#3 0x22a799c0 in Curl_http (conn=0x288f400, done=0x9fbf429c) at http.c:1987
#4 0x22a85d78 in Curl_do (connp=0x286b7cc, done=0x9fbf429c) at url.c:4558
#5 0x22a92bf8 in multi_runsingle (multi=0x280f800, easy=0x286b7c0) at multi.c:1121
#6 0x22a93281 in curl_multi_perform (multi_handle=0x280f800, running_handles=0x9fbf4360) at multi.c:1474

Is there any known condition / problem that would cause this ?
Can a check be added in strequal.c to see if the pointer is valid , instead of dropping core ?

Thanks
Savitha
Received on 2009-06-20