Find bug in dns resovle

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

thanks

On Mon, Nov 17, 2008 at 10:20:34AM +0800, [email protected] 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 ?

Igor S. wrote:

On Mon, Nov 17, 2008 at 10:20:34AM +0800, [email protected] 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 :stuck_out_tongue:

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 :stuck_out_tongue:

This is the same.

Meaning should I change it in my nginx source, or not?!

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 :stuck_out_tongue:

This is the same.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs