~ubuntu-branches/ubuntu/raring/nginx/raring

« back to all changes in this revision

Viewing changes to src/core/ngx_resolver.c

  • Committer: Package Import Robot
  • Author(s): Cyril Lavier, Cyril Lavier
  • Date: 2012-06-27 13:52:03 UTC
  • mfrom: (4.2.51 sid)
  • Revision ID: package-import@ubuntu.com-20120627135203-82rzqkajfpo1m77u
Tags: 1.2.1-2
[Cyril Lavier]
* Urgency set to medium, security bug in naxsi module, fix via upstream.
* debian/modules/naxsi:
  + Updated naxsi module to version 0.46-1 fixing the following security
    issue : potential file disclosure in nx_extract.

Show diffs side-by-side

added added

removed removed

Lines of Context:
513
513
 
514
514
        /* lock alloc mutex */
515
515
 
516
 
        ngx_resolver_free_locked(r, rn->query);
517
 
        rn->query = NULL;
 
516
        if (rn->query) {
 
517
            ngx_resolver_free_locked(r, rn->query);
 
518
            rn->query = NULL;
 
519
        }
518
520
 
519
521
        if (rn->cnlen) {
520
522
            ngx_resolver_free_locked(r, rn->u.cname);
1409
1411
            ngx_resolver_free(r, addrs);
1410
1412
        }
1411
1413
 
 
1414
        ngx_resolver_free(r, rn->query);
 
1415
        rn->query = NULL;
 
1416
 
1412
1417
        return;
1413
1418
 
1414
1419
    } else if (cname) {
1441
1446
            (void) ngx_resolve_name_locked(r, ctx);
1442
1447
        }
1443
1448
 
 
1449
        ngx_resolver_free(r, rn->query);
 
1450
        rn->query = NULL;
 
1451
 
1444
1452
        return;
1445
1453
    }
1446
1454
 
1834
1842
    p--;
1835
1843
    *p-- = '\0';
1836
1844
 
 
1845
    if (ctx->name.len == 0)  {
 
1846
        return NGX_DECLINED;
 
1847
    }
 
1848
 
1837
1849
    for (s = ctx->name.data + ctx->name.len - 1; s >= ctx->name.data; s--) {
1838
1850
        if (*s != '.') {
1839
1851
            *p = *s;