strscpy needs the buffer length not the string length (so including
the '\0').
Fixes: f697b9432d9c ("linuxkpi: drm-kmod debugfs support")
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential D37771
linuxkpi: seq_read: Fix one by one error manu on Dec 21 2022, 11:44 AM. Authored by Tags None Referenced Files
Details
strscpy needs the buffer length not the string length (so including Fixes: f697b9432d9c ("linuxkpi: drm-kmod debugfs support")
Diff Detail
Event TimelineComment Actions Thanks for finding this. I was under the impression the sbuf_len returned Comment Actions Or set SBUF_INCLUDENUL which will then return the + 1? Without looking based on @jfree 's comment is the logic between sbuf_len and the strscpy correct without the SBUF_INCLUDENUL? Comment Actions Ignore me; the sbuf is finished further up (Phabricator had hid that) so we'll always get the len without the +1.
Comment Actions Wasn't aware of this one, it seems that there is still some questions about it so I'll commit this in the meantime so debugfs can work with drm. |