[SSSD] [PATCHES] mmap_cache: Skip records which doesn't have same hash

Michal Židek mzidek at redhat.com
Wed Aug 28 14:35:14 UTC 2013


Just a small typo... i think this can be amended before
pushing.

On 08/20/2013 10:32 AM, Lukas Slebodnik wrote:
> -    if (hash > mcc->ht_size) {
> -        /* Invalid hash. This should never happen, but better
> -         * return than trying to access out of bounds memory */
> +    if (hash > MC_HT_ELEMS(mcc->ht_size)) {
> +        /* It can happen if rec->hash1 and rec->has2 was the same.
                                                    ^^^^ s/has2/hash2
> +         * or it is invalid hash. It is better to return
> +         * than trying to access out of bounds memory
> +         */
>           return;
>       }

But he code itself is OK.

Michal



More information about the sssd-devel mailing list