Re: [hackers] [sbase][PATCH] expr: tonum: handle case where result was previously calculated
Hi,
On Mon, Jan 22, 2024 at 02:18:10PM -0700, Randy Palamar wrote:
> As pointed out in a mail to dev expr was segfaulting when multiple
> math operations were specified on the command line: eg. 'expr 3 \*
> 2 + 1'. This happens because the tonum(), introduced in e50d533,
> assumed that v->str was always non null. parse() guarantees this
> for user input but this is not the case when doop() is called with
> the result of a previous calculation. However in that case we know
> that v->num is already valid so we can simply return.
> ---
Applied, thanks.
Received on Wed Jan 31 2024 - 05:02:19 CET
This archive was generated by hypermail 2.3.0
: Wed Jan 31 2024 - 05:12:34 CET