mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
main.c: Use assertion to test buffer size
This commit is contained in:
parent
9dde436dd6
commit
e316d253fa
@ -340,8 +340,7 @@ no_prefix (const char *s)
|
||||
|
||||
char *cp = p;
|
||||
int size = 3 + strlen (s) + 1; /* "no-STRING\0" */
|
||||
if (p + size >= buffer + sizeof (buffer))
|
||||
abort ();
|
||||
assert(p + size <= buffer + sizeof (buffer));
|
||||
|
||||
cp[0] = 'n', cp[1] = 'o', cp[2] = '-';
|
||||
strcpy (cp + 3, s);
|
||||
|
Loading…
Reference in New Issue
Block a user