Skip to content

segvault with null terminated input #142

@jcfp

Description

@jcfp

hi,

a bug was reported in debian about a segvault in re2c with null terminated input:

When re2c reads a file that is containing '&' (ampersand) that is followed by null byte, re2c is crashed due to heap overread.

The following is the reproducible steps:
$ echo -ne "&\x00" > A
$ re2c A
Segmentation fault

I'm not sure if the ampersand is actually required, as it seems to segvault with other characters too as long as that null is at the end. The bug was reported against 0.13.5 but this reproduces with 0.16 too.

See the debian bug report for more details.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions