Rever the strmem() addition and add a TODO element

strmem() was not very well thought out. The thing is the following:
If the string contains a zero character, we want to match it, and not
stop right there in place.

The "real" solution is to use memmem() where needed and replace all
functions that assume zero-terminated-strings from standard input, which
could lead to early string-breakoffs.
This requires a strict tracking of string lengths.
This commit is contained in:
FRIGN
2016-02-25 22:59:35 +01:00
committed by sin
parent 3396088666
commit a88906b423
5 changed files with 4 additions and 27 deletions

2
util.h
View File

@@ -58,8 +58,6 @@ size_t estrlcpy(char *, const char *, size_t);
#undef strsep
char *strsep(char **, const char *);
char *strmem(char *, char *, size_t);
/* regex */
int enregcomp(int, regex_t *, const char *, int);
int eregcomp(regex_t *, const char *, int);