X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=linux%2Fbsd_comp.c;h=bb523bd240e91242caec2bad24fa4a6ac298b5df;hp=508db4f622296ecea590c8a71467785b57e99b94;hb=9c3c5cdb5f30e02e6ff5772b3b01992de191a384;hpb=0f61ac5460e89dd768f1fb56fbdd8fa6f8af79f1 diff --git a/linux/bsd_comp.c b/linux/bsd_comp.c index 508db4f..bb523bd 100644 --- a/linux/bsd_comp.c +++ b/linux/bsd_comp.c @@ -49,7 +49,7 @@ * install a new bsd_comp.c file. Don't change the format of that * line otherwise, so the installation script can recognize it. * - * $Id: bsd_comp.c,v 1.2 1995/12/18 03:37:05 paulus Exp $ + * $Id: bsd_comp.c,v 1.3 1996/01/18 03:12:47 paulus Exp $ */ #ifndef MODULE @@ -501,7 +501,9 @@ static int bsd_init (void *state, unsigned char *options, struct bsd_db *db = state; int indx; - if ((opt_len != 3) || (options[0] != CI_BSD_COMPRESS) || (options[1] != 3) + if ((opt_len < CILEN_BSD_COMPRESS) + || (options[0] != CI_BSD_COMPRESS) + || (options[1] != CILEN_BSD_COMPRESS) || (BSD_VERSION(options[2]) != BSD_CURRENT_VERSION) || (BSD_NBITS(options[2]) != db->maxbits) || (decomp && db->lens == NULL))