fix well-known CPI handling bug. (sync with KAME code)

This commit is contained in:
itojun 1999-11-05 14:57:00 +00:00
parent 37ecccca6b
commit e127ba2f0b
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipcomp_input.c,v 1.5 1999/07/30 10:35:37 itojun Exp $ */
/* $NetBSD: ipcomp_input.c,v 1.6 1999/11/05 14:57:00 itojun Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@ -167,7 +167,7 @@ ipcomp4_input(m, va_alist)
/* other parameters to look at? */
}
}
if (cpi < IPCOMP_MAX || ipcomp_algorithms[cpi].decompress != NULL)
if (cpi < IPCOMP_MAX && ipcomp_algorithms[cpi].decompress != NULL)
algo = &ipcomp_algorithms[cpi];
else
algo = NULL;
@ -331,7 +331,7 @@ ipcomp6_input(mp, offp, proto)
/* other parameters to look at? */
}
}
if (cpi < IPCOMP_MAX || ipcomp_algorithms[cpi].decompress != NULL)
if (cpi < IPCOMP_MAX && ipcomp_algorithms[cpi].decompress != NULL)
algo = &ipcomp_algorithms[cpi];
else
algo = NULL;