* [PATCH][TOOLS] libxc: check length on copy
@ 2007-10-23 12:36 Christoph Egger
0 siblings, 0 replies; only message in thread
From: Christoph Egger @ 2007-10-23 12:36 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 542 bytes --]
Hi!
Attached patch checks length on string copy.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
AMD Saxony, Dresden, Germany
Operating System Research Center
Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
Dr. Hans-R. Deppe, Thomas McCoy
[-- Attachment #2: xen_xc.diff --]
[-- Type: text/plain, Size: 564 bytes --]
diff -r 4970cbf9b19e tools/libxc/xc_dom_boot.c
--- a/tools/libxc/xc_dom_boot.c Tue Oct 23 09:41:06 2007 +0100
+++ b/tools/libxc/xc_dom_boot.c Tue Oct 23 13:59:19 2007 +0200
@@ -92,7 +92,9 @@ int xc_dom_compat_check(struct xc_dom_im
char *item, *ptr;
int match, found = 0;
- strcpy(xen_caps, dom->xen_caps);
+ strncpy(xen_caps, dom->xen_caps, XEN_CAPABILITIES_INFO_LEN - 1);
+ xen_caps[XEN_CAPABILITIES_INFO_LEN - 1] = '\0';
+
for ( item = strtok_r(xen_caps, " ", &ptr);
item != NULL ; item = strtok_r(NULL, " ", &ptr) )
{
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-23 12:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 12:36 [PATCH][TOOLS] libxc: check length on copy Christoph Egger
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.