qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] qdev-property: Make bit property


From: Markus Armbruster
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] qdev-property: Make bit property parsing stricter
Date: Tue, 24 Jan 2012 13:05:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Jan Kiszka <address@hidden> writes:

> On 2012-01-21 17:36, Andreas Färber wrote:
>> Am 21.01.2012 14:43, schrieb Jan Kiszka:
>>> By using strncasecmp, we allow for arbitrary characters after the
>>> "on"/"off" string. Fix this by switching to strcasecmp.
>>>
>>> Signed-off-by: Jan Kiszka <address@hidden>
>> 
>> Reviewed-by: Andreas Färber <address@hidden>
>> 
>> An alternative might be to increase the char count by one. For a const
>> char* parameter I see the responsibility for nul-terminating at the
>> caller though, so this seems right. Did you check all callers?
>
> For any normal function that takes a char * string without a maximum
> length, the responsibility for terminating is on caller side. Also
> because we checks against patterns of different length. So we don't need
> to jump through hoops here.

I agree.

Reviewed-by: Markus Armbruster <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]