Ignore:
Timestamp:
Apr 6, 2011 7:01:55 AM (13 years ago)
Author:
bennylp
Message:

Re #1186: fixed crash when parsing fmtp with more than 8 parameters by enlarging the default limit, fix the crash, and make the limit configurable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/stream_common.c

    r3419 r3498  
    1818 */ 
    1919#include <pjmedia/stream_common.h> 
     20#include <pj/log.h> 
     21 
     22#define THIS_FILE       "stream_common.c" 
    2023 
    2124/* 
     
    5659    while (p < p_end) { 
    5760        char *token, *start, *end; 
     61 
     62        if (fmtp->cnt >= PJMEDIA_CODEC_MAX_FMTP_CNT) { 
     63            PJ_LOG(4,(THIS_FILE, 
     64                      "Warning: fmtp parameter count exceeds " 
     65                      "PJMEDIA_CODEC_MAX_FMTP_CNT")); 
     66            return PJ_SUCCESS; 
     67        } 
    5868 
    5969        /* Skip whitespaces */ 
Note: See TracChangeset for help on using the changeset viewer.