curl-library
llist->next off by one
Date: Mon, 10 Nov 2003 18:34:51 +0100
The following occurred to me in hash.c,
at line 259 in function Curl_hash_clean_with_criterium:
if (comp(user, he->ptr)) {
(gdb) p le
$5 = (curl_llist_element *) 0x8570367
This is the last element of a list that looks like this:
(gdb) p *list.head
$7 = {ptr = 0x865adf8, prev = 0x0, next = 0x8666208}
(gdb) p *$.next
...
$88 = {ptr = 0x915dab8, prev = 0x8d73868, next = 0x8662bb0}
(gdb) p *$.next
$89 = {ptr = 0x8663dc0, prev = 0x915dae0, next = 0x8570367}
(gdb) p *$.next
$90 = {ptr = 0x47fb1000, prev = 0x662bb008, next = 0x8}
The value of next in $89 is off by one. In fact the correct
value should be:
(gdb) p *(curl_llist_element *)0x8570368
$98 = {ptr = 0x847fb10, prev = 0x8662bb0, next = 0x0}
Has anyone else seen a similar situation?
I am running version 7.10.9-CVS.
-- Beppe Attardi
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
Received on 2003-11-10