Your patch was added. On 05/12/2015 09:35 AM, Jaroslav Skarvada wrote: > Hi, > > I have noticed there are some sprintf that may lead to buffer > overflows, e.g. the following can crash powertop: > > # powertop --csv=`printf 'a%.0s' {1..5000}` > > I attempted to fix hopefully most of them by converting > the code to snprintf. For data returned by kernel > it's probably unlikely to cause overflows, but why > not cover it all. I also tried to unify buffer > sizes for paths/filenames to PATH_MAX. > > The second patch tries to improve handling of reporting > filenames. It works the following way: > > powertop --html > generates 'powertop.html' file > > powertop --html=myfile.suffix > generates 'myfile.suffix' file > > powertop -i 2 --html > generates 'powertop-TIMESTAMPS.html' files > > powertop -i 2 --html=myfile.suffix > generates 'myfile-TIMESTAMPS.suffix' files > > powertop -i 2 --html=myfile > generates 'myfile-TIMESTAMPS' files > > Similarly for CSV. > > I think this is more logical behavior > > regards > > Jaroslav > > > > _______________________________________________ > PowerTop mailing list > PowerTop(a)lists.01.org > https://lists.01.org/mailman/listinfo/powertop > -- Thank you,