[PATCH 09/16] pppd: Fix ccp_cilen calculated size if both deflate_correct and deflate_draft are enabled

This fixes a bug where ccp_cilen() will return 4 bytes less than
necessary for the addci buffer if both deflate_correct and
deflate_draft are enabled.

Signed-off-by: Sylvain Rochet <gradator@gradator.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

Gbp-Pq: Name 0009-pppd-Fix-ccp_cilen-calculated-size-if-both-deflate_c.patch
This commit is contained in:
Sylvain Rochet 2015-03-24 21:21:40 +01:00 committed by openKylinBot
parent 643eaac200
commit b78d197bdf
1 changed files with 2 additions and 1 deletions

View File

@ -676,7 +676,8 @@ ccp_cilen(f)
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
return (go->bsd_compress? CILEN_BSD_COMPRESS: 0) return (go->bsd_compress? CILEN_BSD_COMPRESS: 0)
+ (go->deflate? CILEN_DEFLATE: 0) + (go->deflate && go->deflate_correct? CILEN_DEFLATE: 0)
+ (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0)
+ (go->predictor_1? CILEN_PREDICTOR_1: 0) + (go->predictor_1? CILEN_PREDICTOR_1: 0)
+ (go->predictor_2? CILEN_PREDICTOR_2: 0) + (go->predictor_2? CILEN_PREDICTOR_2: 0)
+ (go->mppe? CILEN_MPPE: 0); + (go->mppe? CILEN_MPPE: 0);