Welcome! Log In Create A New Profile

Advanced

Re: nginx-0.7.49

April 06, 2009 07:44AM
On Mon, Apr 06, 2009 at 03:42:57PM +0400, Maxim Dounin wrote:

> Hello!
>
> On Mon, Apr 06, 2009 at 03:30:54PM +0400, Maxim Dounin wrote:
>
> > Hello!
> >
> > On Mon, Apr 06, 2009 at 02:45:18PM +0400, Igor Sysoev wrote:
> >
> > > Changes with nginx 0.7.49 06 Apr 2009
> > >
> > > *) Change: a segmentation fault might occur in worker process, if the
> > > $arg_... variables were used; the bug had appeared in 0.7.48.
> >
> > It should be
> >
> > --- a/src/core/ngx_string.c
> > +++ b/src/core/ngx_string.c
> > @@ -703,14 +703,14 @@ ngx_strlcasestrn(u_char *s1, u_char *las
> > {
> > ngx_uint_t c1, c2;
> >
> > + c2 = (ngx_uint_t) *s2++;
> > + c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2;
> > + last -= n;
> > +
> > if (s1 <= last) {
> > return NULL;
> > }
> >
> > - c2 = (ngx_uint_t) *s2++;
> > - c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2;
> > - last -= n;
> > -
> > do {
> > do {
> > if (s1 == last) {
>
> Disregard this. It should be
>
> diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
> --- a/src/core/ngx_string.c
> +++ b/src/core/ngx_string.c
> @@ -703,14 +703,14 @@ ngx_strlcasestrn(u_char *s1, u_char *las
> {
> ngx_uint_t c1, c2;
>
> - if (s1 <= last) {
> - return NULL;
> - }
> -
> c2 = (ngx_uint_t) *s2++;
> c2 = (c2 >= 'A' && c2 <= 'Z') ? (c2 | 0x20) : c2;
> last -= n;
>
> + if (s1 >= last) {
> + return NULL;
> + }
> +
> do {
> do {
> if (s1 == last) {
>
>
> Shame on me again.
>
> Maxim Dounin
>
> p.s. 0.7.49 doesn't handle $args_* at all.

Yes. Actually it's enough:

do {
do {
if (s1 >= last) {


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

nginx-0.7.49

Igor Sysoev April 06, 2009 06:45AM

Re: nginx-0.7.49

Maxim Dounin April 06, 2009 07:30AM

Re: nginx-0.7.49

Maxim Dounin April 06, 2009 07:42AM

Re: nginx-0.7.49

Igor Sysoev April 06, 2009 07:44AM

Re: nginx-0.7.49

Maxim Dounin April 06, 2009 11:23AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 102
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready