URL: https://github.com/SSSD/sssd/pull/455
Title: #455: mmap_cache: make checks independent of input size

lslebodn commented:
"""
On (27/11/17 14:23), sumit-bose wrote:
>I think it has to be at least
>
>- if (key->len > strs_len) {
>+ if (key->len + name_ptr - strs_offset > strs_len) {
>
>because name_ptr is relative to rec->data and includes some other uint32_t 
>values the different record structs starts with which are not include in 
>strs_len/data_len. But I think being more strict here is not needed because 
>also for the passwd and group case strs_len includes other strings as well 
>making the whole check only a rough estimate.
>

Probably yes, it was from top of my head.

>> IMHO it's faster then trying to find '\0'.
>
>I already removed the check in the latest version.
>

I noticed that and thank you.

I'm fine even with current version.

ACK++

LS

"""

See the full comment at 
https://github.com/SSSD/sssd/pull/455#issuecomment-347198606
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to