• Ronnie Sahlberg's avatar
    cifs: remove coverity warning in calc_lanman_hash · 52baa51d
    Ronnie Sahlberg authored
    password_with_pad is a fixed size buffer of 16 bytes, it contains a
    password string, to be padded with \0 if shorter than 16 bytes
    but is just truncated if longer.
    It is not, and we do not depend on it to be, nul terminated.
    As such, do not use strncpy() to populate this buffer since
    the str* prefix suggests that this is a string, which it is not,
    and it also confuses coverity causing a false warning.
    Detected by CoverityScan CID#113743 ("Buffer not null terminated")
    Signed-off-by: 's avatarRonnie Sahlberg <lsahlber@redhat.com>
    Signed-off-by: 's avatarSteve French <stfrench@microsoft.com>
cifsencrypt.c 23.6 KB