From: Jean Guyader <jean.guyader@eu.citrix.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATH] Fix overflow in xc_set_cpufreq_gov
Date: Fri, 12 Dec 2008 12:17:50 +0000 [thread overview]
Message-ID: <4942566E.9010907@eu.citrix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
This fix an overflow on scaling_governor. Recent compilers fail on this
kind of statements.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
--
Jean Guyader
[-- Attachment #2: fix_xc_set_cpufreq_gov_overflow.patch --]
[-- Type: text/plain, Size: 460 bytes --]
diff -r 68b76ad4faf7 tools/libxc/xc_pm.c
--- a/tools/libxc/xc_pm.c Thu Dec 11 22:32:20 2008 +0000
+++ b/tools/libxc/xc_pm.c Fri Dec 12 12:14:22 2008 +0000
@@ -285,7 +285,7 @@
sysctl.u.pm_op.cmd = SET_CPUFREQ_GOV;
sysctl.u.pm_op.cpuid = cpuid;
strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN);
- scaling_governor[CPUFREQ_NAME_LEN] = '\0';
+ scaling_governor[CPUFREQ_NAME_LEN - 1] = '\0';
return xc_sysctl(xc_handle, &sysctl);
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2008-12-12 12:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4942566E.9010907@eu.citrix.com \
--to=jean.guyader@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.