mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-29 12:44:53 +01:00
Add sanity check for "no previous regular expression" state,
bringed by 'more'
This commit is contained in:
parent
da9e71aeaf
commit
afaa039a5d
@ -59,8 +59,11 @@ char *
|
||||
re_comp(s)
|
||||
char *s;
|
||||
{
|
||||
if (s == NULL || *s == '\0')
|
||||
if (s == NULL || *s == '\0') {
|
||||
if (re_regexp == NULL)
|
||||
return "no previous regular expression";
|
||||
return (NULL);
|
||||
}
|
||||
if (re_regexp)
|
||||
free(re_regexp);
|
||||
if (re_errstr)
|
||||
|
Loading…
Reference in New Issue
Block a user