 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 6/7] libxc: Fix misleading use of strncpy code in build_hvm_info()
 Jennifer Herbert writes ("[Xen-devel] [PATCH 6/7] libxc: Fix misleading use of 
strncpy code in build_hvm_info()"):
> hvm_info->signature is not a string, but an 64 bit int, and is not
> NULL terminated.  The use of strncpy to populate it is inappropriate and
> potentially misleading.  A cursory glance might have you thinking someone
> had miscounted the length of the string literal - not realising it was
> intentionally cropping of the null termination.
> Also, since we wish to initialise all of hvm_info->signature, and
> certainly no more, the use of sizeof is safer.
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |