gethostbyname call with 0 length arg

Phil Goss pagoss at gmail.com
Fri Feb 3 18:12:35 CST 2006


Thanks,

So basically, this check is now taken care of in the latest patches,  
correct?

Good ... Ill take a look at the guide as James suggested.

Cheers,
Phil

On Wed, 01 Feb 2006 23:27:53 +0100, Detlef Riekenberg <wine.dev at web.de>  
wrote:

> Am Sonntag, den 29.01.2006, 14:46 +0100 schrieb Phil Goss:
>
>> There seems to be a check in the gethostbyname for a NULL arg name  ...
>> if(!name) ... But no check for  ... if(!strlen(name)) ....
>
> Alexandre changed "strlen(xxx) > 0" in my first Patch to xxx[0]
> So for your code above, simple change:
>
> if(!name) {
>
> to
>
> if((!name) && (name[0])) {
>
> The logic is the same: use the code-path, if name is NULL and use it
> also, when the string is empty.
>
> I send this type of patch yesterday and it's already in the tree.
>
> The Commit-Message is here:
> http://www.winehq.org/pipermail/wine-cvs/2006-February/020657.html
>
> (i used (pName != NULL) to have a common style in this function)
>
>
>> Does the above make sense, as I am not a programmer?
> Yes, it does, and it's important when we have a Program that depend on
> this behaviour.
>
>> Not sure if this s bug in wine even though it implementation should be
>> matching Windows native.
>
> That's also a reason, why we have the Testsuite.
> A specific Test changes "should match" to
> "does not match (yet)" or "matches all the cases we tested".
>
> The winedev-guide is nice to read. (see msg from James)
>
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the wine-devel mailing list