[libvirt] [PATCH] esx: Fix esxVI_String_Deserialize
Matthias Bolte
matthias.bolte at googlemail.com
Wed Jul 18 23:34:12 UTC 2012
2012/7/19 Eric Blake <eblake at redhat.com>:
> On 07/18/2012 04:48 PM, Matthias Bolte wrote:
>> It was broken since forever as it expected a libxml2
>> XML_ELEMENT_NODE containing a XML_TEXT_NODE instead of
>> just a XML_TEXT_NODE.
>>
>> This problem was not discovered for so long because
>> esxVI_String_Deserialize was not used until now.
>>
>> Reported by Ata Bohra
>> ---
>> src/esx/esx_vi_types.c | 23 +++++++++++++++++++----
>> 1 files changed, 19 insertions(+), 4 deletions(-)
>
> ACK. Even though you're adding lines of code...
>
>> -/* esxVI_String_Deserialize */
>> -ESX_VI__TEMPLATE__DESERIALIZE(String,
>
> ..the old code was a macro expanding into a much larger unwrap
> operation, and your new code is a subset of that with less unwrapping.
>
>> + if (string == NULL || *string != NULL) {
>> + ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument"));
>
> Conflict magnet, depending on whether your patch or Dan's error cleanup
> patch goes in first.
So I went ahead and pushed this one. Thanks :)
--
Matthias Bolte
http://photron.blogspot.com
More information about the libvir-list
mailing list