bug-libmatheval
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-libmatheval] Segmentation fault with 1.1.9


From: Aleksandar Samardžić
Subject: Re: [bug-libmatheval] Segmentation fault with 1.1.9
Date: Sat, 20 Oct 2012 09:05:28 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Oct 19, 2012 at 05:23:43AM -0400, Evan Andersen wrote:
> I can produce a segmentation fault in evaluator_evaluate() by entering the
> following input:
> 
> -5.45exp(-t/0.22)
> 
> However, adding a * between the constant and exp allows the code to
> run successfully.
> 
> -5.45*exp(-t/0.22)
> 
> I check the output of evaluator_create(), and it does return a valid
> pointer in both instances.
> 
> I have attached the code I was using to perform this test. (it's short)

Are you sure that you are checking evaluator_create() return value for
string read from the standard input?  As there is no such check in the
sample code you posted with your previous message, and when I add it, it
turns out that evaluator_create() is returning NULL (as expected) for
syntactically incorrect string.

Regards,
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]