[PATCH] powertop fix buffer overflow, removed unecessary strlen call
haroon maqsood
maqsood3525 at live.com
Wed Nov 7 11:31:32 UTC 2018
Hi ,
Please ignore this patch, as I realised that the strlen was correct looking at the if condition following the strlen
Sorry for the inconvenience caused
Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: haroon maqsood <maqsood3525 at live.com>
Sent: Wednesday, November 7, 2018 1:03:49 PM
To: busybox at busybox.net
Subject: [PATCH] powertop fix buffer overflow, removed unecessary strlen call
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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20181107/c27158d1/attachment.html>
More information about the busybox
mailing list