[PATCH] powertop fix buffer overflow, removed unecessary strlen call

haroon maqsood maqsood3525 at live.com
Wed Nov 7 08:03:49 UTC 2018


Hi,
PFA a small change to procps/powertop that removes a potential buffer overflow
reported by gcc.
in my opinion as dirent->d_name is allocated on the stack , we can avoid the
strlen call, and make the char buf[] a bit bigger to accomodate the strings
that are hardcoded i.e /proc/acpi/process/d->d_name/power.
Thanks
Haroon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-powertop-fix-buffer-overflow-remove-unecessary-strle.patch
Type: text/x-diff
Size: 1064 bytes
Desc: 0001-powertop-fix-buffer-overflow-remove-unecessary-strle.patch
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20181107/5e298612/attachment-0001.patch>


More information about the busybox mailing list