pwqfilter.c (passwdqc-2.0.1) | : | pwqfilter.c (passwdqc-2.0.2) | ||
---|---|---|---|---|
skipping to change at line 504 | skipping to change at line 504 | |||
goto out; | goto out; | |||
} | } | |||
SET_THRESHOLD(header.threshold) | SET_THRESHOLD(header.threshold) | |||
SET_BUCKET_SIZE(header.bucket_size) | SET_BUCKET_SIZE(header.bucket_size) | |||
if ((options & OPT_FP_RATE_AT_HIGH_LOAD) && header.threshold < 4) | if ((options & OPT_FP_RATE_AT_HIGH_LOAD) && header.threshold < 4) | |||
fprintf(stderr, "pwqfilter: Warning: --optimize-fp-rate-at-high-l oad is too late for this filter.\n"); | fprintf(stderr, "pwqfilter: Warning: --optimize-fp-rate-at-high-l oad is too late for this filter.\n"); | |||
nbuckets = (uint32_t)(header.capacity >> 2); | nbuckets = (uint32_t)(header.capacity >> 2); | |||
if (nbuckets > SIZE_MAX / sizeof(*packed)) { | if (SIZE_MAX <= 0xffffffffU && nbuckets > SIZE_MAX / sizeof(*packed)) { | |||
fprintf(stderr, "pwqfilter: Input filter claims to be too large f or this system.\n"); | fprintf(stderr, "pwqfilter: Input filter claims to be too large f or this system.\n"); | |||
goto fail; | goto fail; | |||
} | } | |||
packed = malloc(nbuckets * sizeof(*packed)); | packed = malloc(nbuckets * sizeof(*packed)); | |||
if (!packed) { | if (!packed) { | |||
perror("pwqfilter: malloc"); | perror("pwqfilter: malloc"); | |||
goto fail; | goto fail; | |||
} | } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |