[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V2] x86, amd_ucode: Support multiple container files appended together



On 6/25/2014 5:47 AM, Jan Beulich wrote:
+    return 0;
+}
+
+static int container_fast_forward(const void *data, size_t size_left,
size_t *offset)
+{
+    size_t size;
+    uint32_t *header;
+
+    while ( size_left )
+    {
+        header = (uint32_t *) (data + *offset);
Pointless (and wrong, as it discards the const qualifier) cast.
Ok. I have removed this cast (and as a consequence *header) entirely.
Also need -
if ( size_left < 0 ) check. Reason-
With offset value being advanced aggressively in 'install_equiv_cpu_table',
It could be that we go over the bufsize. This situation will be caught here.
Except that size_left is of unsigned type, i.e. will never be < 0.


Oh. Missed that. Shall fix this.

Thanks,
-Aravind.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.