Ignore:
Timestamp:
Jul 1, 2019 7:12:43 AM (5 years ago)
Author:
ming
Message:

Fixed #2209: Insufficient variable storage to contain Expires header field/ parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-simple/evsub_msg.c

    r5558 r6035  
    150150    hdr->name = hdr->sname = sub_state; 
    151151    hdr->vptr = &sub_state_hdr_vptr; 
    152     hdr->expires_param = -1; 
     152    hdr->expires_param = PJSIP_EXPIRES_NOT_SPECIFIED; 
    153153    hdr->retry_after = -1; 
    154154    pj_list_init(hdr); 
     
    172172    copy_advance_pair_escape(p, ";reason=", 8, hdr->reason_param, 
    173173                             pc->pjsip_TOKEN_SPEC); 
    174     if (hdr->expires_param >= 0) { 
     174    if (hdr->expires_param != PJSIP_EXPIRES_NOT_SPECIFIED) { 
    175175        pj_memcpy(p, ";expires=", 9); 
    176176        p += 9; 
     
    275275        } else if (pj_stricmp(&pname, &expires) == 0) { 
    276276            hdr->expires_param = pj_strtoul(&pvalue); 
     277            if (hdr->expires_param == PJSIP_EXPIRES_NOT_SPECIFIED) 
     278                hdr->expires_param--; 
    277279 
    278280        } else if (pj_stricmp(&pname, &retry_after) == 0) { 
Note: See TracChangeset for help on using the changeset viewer.