[PATCH v4 2/13] Correct buffer parsing in update_dt_node()

Stephen Rothwell sfr at canb.auug.org.au
Fri Apr 26 13:01:40 EST 2013


Hi Nathan,


On Wed, 24 Apr 2013 10:49:36 -0500 Nathan Fontenot <nfont at linux.vnet.ibm.com> wrote:
>
> @@ -134,6 +134,7 @@
>  	char *prop_data;
>  	char *rtas_buf;
>  	int update_properties_token;
> +	u32 vd;
>  
>  	update_properties_token = rtas_token("ibm,update-properties");
>  	if (update_properties_token == RTAS_UNKNOWN_SERVICE)
> @@ -160,13 +161,24 @@
>  
>  		prop_data = rtas_buf + sizeof(*upwa);
>  
> -		for (i = 0; i < upwa->nprops; i++) {
> +		/* The first element of the buffer is the path of the node
> +		 * being updated in the form of a 8 byte string length
                                                    ^^^^
"bit" ?

> +		 * followed by the string. Skip past this to get to the
> +		 * properties being updated.
> +		 */
> +		vd = *prop_data++;
> +		prop_data += vd;
-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20130426/ae9f419d/attachment.sig>


More information about the Linuxppc-dev mailing list