#946695 foma: segfault on mis-use of "_"

Package:
foma
Source:
foma
Description:
Tools for constructing various finite-state automata
Submitter:
Kevin Ryde
Date:
2021-05-31 17:21:09 UTC
Severity:
minor
Tags:
#946695#5
Date:
2019-12-13 22:54:14 UTC
From:
To:
Entering command

    regex x_y;

gets a segfault.  gdb says it's in fsm_count() due to deref of net==NULL.

If I'm not mistaken this is incorrect syntax, but it'd be good to get
some message instead of a segfault.

I struck this on trying to use "_" as part of a "def" regex name.  The
def succeeds, but using it is bad.  I suppose enough quoting could work
but better don't do that ...

#946695#10
Date:
2020-04-21 01:32:08 UTC
From:
To:
forwarded 946695 https://github.com/mhulden/foma/issues/77
thanks

Also looks a bit similar to https://github.com/mhulden/foma/issues/3

#946695#17
Date:
2020-04-21 01:43:19 UTC
From:
To:
Oh, actually a commit from a fortnight ago might be relevant.  I'm not
well setup to try at this moment, but if so and all else good then can
go to fixed-upstream in the fullness of time.

https://github.com/mhulden/foma/commit/e20a453a318128973d75753f9ecbef0e6b82b23f