[crossfire] Re: [Crossfire-cvs] CVS commit: crossfire
Brendan Lally
brenlally at gmail.com
Mon Oct 3 10:50:25 CDT 2005
On 10/3/05, Alex Schultz <
alex_sch at telus.net
> wrote:
>
Mikee and I both discovered a segfault caused here:
>
>
Saving map /scorn/shops/bowshop
>
>
Program received signal SIGSEGV, Segmentation fault.
>
print_shop_string (m=0xafffee20, output_string=0xafffee20 "") at map.c:710
>
710 for (i=0; i>items[0].index; i++) {
>
(gdb) bt
>
#0 print_shop_string (m=0xafffee20, output_string=0xafffee20 "") at
>
map.c:710
>
>
Looking at this, the issue is "items" being a null pointer. Also, from
>
what I've found, it's something perticular about the bowshop that's
>
causing it. Also, if this helps:
I've fixed a typo in that map now, hopefully that will stop it
crashing, if I am right, then the parser needs to be made more strict
(to cope with errors by merely giving warnings).
Also I used the wrong comparison in that for statement, which I have now fixed.
I shall also look into the parser, and see if there isn't a nice way
to detect malformated headers like that better, and if so discard them
completely.
More information about the crossfire
mailing list