Changeset 5890


Ignore:
Timestamp:
Sep 24, 2018 2:45:20 AM (12 months ago)
Author:
ming
Message:

Re #2147 (misc): Add assertion in pjmedia_port_info_init() to prevent division by zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/port.c

    r3893 r5890  
    4141#define USEC_IN_SEC (pj_uint64_t)1000000 
    4242    unsigned frame_time_usec, avg_bps; 
     43 
     44    PJ_ASSERT_RETURN(clock_rate && channel_count, PJ_EINVAL); 
    4345 
    4446    pj_bzero(info, sizeof(*info)); 
Note: See TracChangeset for help on using the changeset viewer.