Skip to content
Snippets Groups Projects
Commit 204c0300 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher
Browse files

gfs2: Switch from strlcpy to strscpy


Switch from strlcpy to strscpy and make sure that @count is the size of
the smaller of the source and destination buffers.  This prevents
reading beyond the end of the source buffer when the source string isn't
null terminated.

Found by a modified version of syzkaller.

Suggested-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 86934198
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment