On Wed, Nov 18, 2015 at 10:47:39PM +0100, Markus Teich wrote:
> Joerg Jung wrote:
> > Have you compiled sent with address sanitizer as suggested in the link, or
> > enabled the malloc.conf J option on OpenBSD, as mentioned above?
> 
> Heyho Joerg,
> 
> sorry, I missed that point. Please check again, I just pushed a fix, which
> should work. I could not test it, since I don't have a BSD system and
> compilation with address sanitizer enabled failed (probably due to the 
> required
> libs not being compiled with it). Let me know if it works now.

Nope. Same segfault (at same line) as before.
>From quick view at the code, AFAIU the following leads to this:

- you have an empty file as input
- you call realloc() for one line (in load line 437)
- you strdup() "empty string" into the not existing first line (in line 441)
- you dereference this line memory later in getfontsize()

-> your load() is flawed, there is nothing you should realloc() or
   strdup(), it is an EMPTY input file without any lines

Reply via email to