Changeset 5996


Ignore:
Timestamp:
May 21, 2019 3:17:11 AM (14 months ago)
Author:
nanang
Message:

Close #2199: Fixed assertion when DNS SRV resolver receives empty record in response.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util/srv_resolver.c

    r5981 r5996  
    240240        } 
    241241 
     242        if (rr->rdata.srv.target.slen == 0) { 
     243            PJ_LOG(4,(query_job->objname, "Hostname is empty!")); 
     244            continue; 
     245        } 
     246 
    242247        /* Build the SRV entry for RR */ 
    243248        pj_bzero(srv, sizeof(*srv)); 
     
    611616         * an A record and resolve with DNS A resolution. 
    612617         */ 
    613         if (query_job->srv_cnt == 0) { 
     618        if (query_job->srv_cnt == 0 && query_job->domain_part.slen > 0) { 
    614619            unsigned new_option = 0; 
    615620 
Note: See TracChangeset for help on using the changeset viewer.