From: Joe Konno <joe.konno at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH v2 5/8] Limit sprintf to buffer size length.
Date: Fri, 17 Oct 2014 10:36:37 -0700 [thread overview]
Message-ID: <544153A5.8000306@linux.intel.com> (raw)
In-Reply-To: 20141015121557.GA1189@swordfish
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
On 10/15/2014 05:15 AM, Sergey Senozhatsky wrote:
> On (10/14/14 11:09), Joe Konno wrote:
>> diff --git a/src/lib.cpp b/src/lib.cpp
>> index 437803b..9cbf78d 100644
>> --- a/src/lib.cpp
>> +++ b/src/lib.cpp
>> @@ -474,10 +474,10 @@ int read_msr(int cpu, uint64_t offset, uint64_t *value)
>> int fd;
>> char msr_path[256];
>>
>> - sprintf(msr_path, "/dev/cpu/%d/msr", cpu);
>> + fd = snprintf(msr_path, 256, "/dev/cpu/%d/msr", cpu);
>
> iirc, this `fd =' has been removed. it's useless per se.
>
> -ss
Will fix.
next reply other threads:[~2014-10-17 17:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 17:36 Joe Konno [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-10-15 12:15 [Powertop] [PATCH v2 5/8] Limit sprintf to buffer size length Sergey Senozhatsky
2014-10-14 18:09 Joe Konno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=544153A5.8000306@linux.intel.com \
--to=powertop@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.