additional check for running off end of string

CVS patchset: 753
CVS date: 1996/07/10 01:38:14
This commit is contained in:
root 1996-07-10 01:38:14 +00:00
parent d671a6567a
commit dd646a2df9
1 changed files with 1 additions and 1 deletions

View File

@ -517,7 +517,7 @@ static int add_file(struct file_entry **festack, const char *name,
while (*prefixTest == '/') {
prefixTest++; /* Skip leading "/" */
}
while (*prefixPtr && (*prefixTest == *prefixPtr)) {
while (*prefixPtr && *prefixTest && (*prefixTest == *prefixPtr)) {
prefixPtr++;
prefixTest++;
}