user32/edit: Check for Null before strlen(try2)

Nikolay Sivov bunglehead at gmail.com
Sat Jun 6 07:28:24 CDT 2009


André Hentschel wrote:
> Nikolay Sivov schrieb:
>> André Hentschel wrote:
>>> related to Bug 4742
>>> try2: fixed indentation
>>> ---
>>>  dlls/user32/edit.c |    6 ++++--
>>>  1 files changed, 4 insertions(+), 2 deletions(-)
>> ---
>>
>> -            countA = strlen(textA) + 1;
>> +            if(textA)
>> +                countA = strlen(textA) + 1;
>>         }
>> ---
>>
>>
>> Previous lines use 2 tabs and 4 spaces after.
>> Also a test is needed, looks like bug contains already something to 
>> start with.
>
> I dont think we need a test, if textA is NULL then strlen crashes. 
> Thats all.
Sure, and test will prevent regression if someday anybody decide to 
remove this check,
thinking it's unnecessary.
> Should i change the indentation of the code around?
Just add your line same way.

P.S. I'm not very familiar with patch subject. Treat this as general 
suggestions.



More information about the wine-devel mailing list