libxc: check length on copy
PATCH 1/1 libxc: check length on copy
Hi!
Attached patch checks length on string copy.
Signed-off-by Christoph Egger <[email protected]>
Signature · 12 lines
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
tools/libxc/xc_dom_boot.c +3 -1
@@ -92,7 +92,9 @@ int xc_dom_compat_check(struct xc_dom_imchar *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) ) {
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel