Forum: NGINX find bug in dns resovle

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
(Guest)
on 2008-11-17 04:30
(Received via mailing list)
in function ngx_resolver_copy ,n = (n & 0x3f << 8) + *p;
  should be n = ((n & 0x3f) << 8) + *p;otherwis ,& oprator will not work
correctlly.

  thanks
Igor S. (Guest)
on 2008-11-17 10:00
(Received via mailing list)
On Mon, Nov 17, 2008 at 10:20:34AM +0800, removed_email_address@domain.invalid 
wrote:

>    in function ngx_resolver_copy ,n = (n & 0x3f << 8) + *p;
>   should be n = ((n & 0x3f) << 8) + *p;otherwis ,& oprator will not work correctlly.

Thank you very much.
I had missed it as it becomes apparent on big (>256 bytes) DNS
responses.
What is your full name to include in CHANGES log ?
Robert G. (Guest)
on 2008-11-18 23:43
Igor S. wrote:
> On Mon, Nov 17, 2008 at 10:20:34AM +0800, removed_email_address@domain.invalid wrote:
>
>>    in function ngx_resolver_copy ,n = (n & 0x3f << 8) + *p;
>>   should be n = ((n & 0x3f) << 8) + *p;otherwis ,& oprator will not work correctlly.
>
> Thank you very much.
> I had missed it as it becomes apparent on big (>256 bytes) DNS
> responses.
> What is your full name to include in CHANGES log ?

Isnt the same idea of
n = (n & 0x3f << 8) + *src;

should this be:

n = ((n & 0x3f << 8) + *src);

Sorry I might be wrong... but who knows :P
Igor S. (Guest)
on 2008-11-19 00:02
(Received via mailing list)
On Tue, Nov 18, 2008 at 10:43:32PM +0100, Robert G. wrote:

>
> Isnt the same idea of
> n = (n & 0x3f << 8) + *src;
>
> should this be:
>
> n = ((n & 0x3f << 8) + *src);
>
> Sorry I might be wrong... but who knows :P

This is the same.
Robert G. (Guest)
on 2008-11-19 09:33
Igor S. wrote:
> On Tue, Nov 18, 2008 at 10:43:32PM +0100, Robert G. wrote:
>
>>
>> Isnt the same idea of
>> n = (n & 0x3f << 8) + *src;
>>
>> should this be:
>>
>> n = ((n & 0x3f << 8) + *src);
>>
>> Sorry I might be wrong... but who knows :P
>
> This is the same.

Meaning should I change it in my nginx source, or not?!
This topic is locked and can not be replied to.