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/sip_parser.c

    r5697 r6035  
    18861886                   pvalue.slen)  
    18871887        { 
    1888             strtoi_validate(&pvalue, PJSIP_MIN_EXPIRES, PJSIP_MAX_EXPIRES, 
    1889                             &hdr->expires); 
     1888            hdr->expires = pj_strtoul(&pvalue); 
     1889            if (hdr->expires == PJSIP_EXPIRES_NOT_SPECIFIED) 
     1890                hdr->expires--; 
     1891            if (hdr->expires > PJSIP_MAX_EXPIRES) 
     1892                hdr->expires = PJSIP_MAX_EXPIRES; 
     1893            if (hdr->expires < PJSIP_MIN_EXPIRES) 
     1894                hdr->expires = PJSIP_MIN_EXPIRES; 
    18901895        } else { 
    18911896            pjsip_param *p = PJ_POOL_ALLOC_T(pool, pjsip_param); 
Note: See TracChangeset for help on using the changeset viewer.