Changeset 3747 for pjproject


Ignore:
Timestamp:
Sep 9, 2011 9:49:41 AM (13 years ago)
Author:
bennylp
Message:

Fixed #1367: Crash if presence PIDF body is missing <basic> element (thanks Matt DiMeo? for the patch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/src/pjsip-simple/pidf.c

    r3553 r3747  
    325325{ 
    326326    pj_xml_node *node = pj_xml_find_node((pj_xml_node*)st, &BASIC); 
    327     pj_assert(node != NULL); 
     327    if (!node) 
     328        return PJ_FALSE; 
    328329    return pj_stricmp(&node->content, &OPEN)==0; 
    329330} 
     
    332333{ 
    333334    pj_xml_node *node = pj_xml_find_node(st, &BASIC); 
    334     pj_assert(node != NULL); 
    335     node->content = open ? OPEN : CLOSED; 
     335    if (node) 
     336        node->content = open ? OPEN : CLOSED; 
    336337} 
    337338 
Note: See TracChangeset for help on using the changeset viewer.