X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmisc%2Fcrypt_blowfish.c;h=bd37be84c1e996f9fcfc557ab5afdde1475dbe9a;hb=780aede41913528781bbc8ff0d0e27505595f7c0;hp=d3f798517e872099ffad66e783e2e1e3be3e84dd;hpb=a02bf5fc508c32e8617ff0528d1cc89ed56e3d03;p=musl diff --git a/src/misc/crypt_blowfish.c b/src/misc/crypt_blowfish.c index d3f79851..bd37be84 100644 --- a/src/misc/crypt_blowfish.c +++ b/src/misc/crypt_blowfish.c @@ -625,7 +625,7 @@ static char *BF_crypt(const char *key, const char *setting, } count = (BF_word)1 << ((setting[4] - '0') * 10 + (setting[5] - '0')); - if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) { + if (count < min || count > 2048 || BF_decode(data.binary.salt, &setting[7], 16)) { return NULL; } BF_swap(data.binary.salt, 4);