Message ID | 49EF1EF5.8060008@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c index 7d75272..e7ed048 100644 --- a/fs/cifs/cifs_unicode.c +++ b/fs/cifs/cifs_unicode.c @@ -51,6 +51,8 @@ cifs_strfromUCS_le(char *to, const __le16 *from, } } to[outlen] = 0; + /* ensure double-byte NULL termination */ + to[outlen + 1] = 0; return outlen; } _______________________________________________
Ensure NULL termination (double-byte) is done here and prevent callers from doing incorrect NULL termination. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> --- fs/cifs/cifs_unicode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) linux-cifs-client mailing list linux-cifs-client@lists.samba.org https://lists.samba.org/mailman/listinfo/linux-cifs-client