Re: [PATCH 4/5] phyp: Fix too small buffer allocation in phypAttachDevice

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

 



2011/4/14 Eric Blake <eblake@xxxxxxxxxx>:
> On 04/14/2011 06:00 AM, Matthias Bolte wrote:
>>> ÂACK, we just need to make sure contains_specialcharacters() and
>>> escape_specialcharacters() don't diverge on the charater set. Maybe
>>> add a comment in escape_specialcharacters() to this effect.
>>>
>>> Daniel
>>>
>>
>> I just moved the character set to a define, like this and pushed the result.
>>
>> @@ -905,32 +911,10 @@ contains_specialcharacters(const char *src)
>>
>> Â Â Âfor (i = 0; i < len; i++) {
>> Â Â Â Â Âswitch (src[i]) {
>> + Â Â Â ÂSPECIALCHARACTER_CASES
>> + Â Â Â Â Â Âreturn true;
>> + Â Â Â Âdefault:
>> + Â Â Â Â Â Âcontinue;
>> Â Â Â Â Â}
>
> Fair enough - continue the loop until we find a special character.
>
>> Â Â Â}
>>
>> @@ -954,35 +938,11 @@ escape_specialcharacters(const char *src)
>>
>> Â Â Âfor (i = 0; i < len; i++) {
>> Â Â Â Â Âswitch (src[i]) {
>> + Â Â Â ÂSPECIALCHARACTER_CASES
>> + Â Â Â Â Â Âcontinue;
>> + Â Â Â Âdefault:
>> + Â Â Â Â Â Âdst[j] = src[i];
>> + Â Â Â Â Â Âj++;
>
> Huh? ÂThat is not escaping characters, but omitting them! ÂThis code
> seems rather broken; was the intent to add \ escaping before special
> characters?

Well, The code was this way from the beginning, we'll have to ask
Eduardo about its intention here.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]