Add and use Strlen(), like strlen() but panics on unreasonably long strings.
This commit is contained in:
@@ -968,7 +968,7 @@ extern char *strip_newline(char *);
|
||||
extern char *stripchars(char *, const char *, const char *);
|
||||
extern char *stripdigits(char *);
|
||||
extern char *eos(char *);
|
||||
extern unsigned Strlen(const char *);
|
||||
extern unsigned Strlen_(const char *, const char *, int);
|
||||
extern boolean str_end_is(const char *, const char *);
|
||||
extern int str_lines_maxlen(const char *);
|
||||
extern char *strkitten(char *, char);
|
||||
|
||||
@@ -262,6 +262,7 @@ typedef uchar nhsym;
|
||||
#define Sprintf (void) sprintf
|
||||
#define Strcat (void) strcat
|
||||
#define Strcpy (void) strcpy
|
||||
#define Strlen(s) Strlen_(s,__func__,__LINE__)
|
||||
#ifdef NEED_VARARGS
|
||||
#define Vprintf (void) vprintf
|
||||
#define Vfprintf (void) vfprintf
|
||||
|
||||
Reference in New Issue
Block a user