Minor changes based on reviews
This commit is contained in:
parent
336bc36e28
commit
52fe443ea1
|
@ -1,4 +1,5 @@
|
|||
# Scheduled scan, only runs on master
|
||||
# Scheduled scan, only runs on master (see
|
||||
# https://stackoverflow.com/a/58800550)
|
||||
|
||||
name: "Coverity Scan (Daily)"
|
||||
|
||||
|
@ -7,13 +8,11 @@ on:
|
|||
- cron: '0 12 * * *' # Daily at 12:00 UTC
|
||||
|
||||
jobs:
|
||||
ubuntu-default-full-bundle:
|
||||
ubuntu-full-bundle:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: master
|
||||
- name: run.sh
|
||||
run: tests/coverity-scan/run.sh -t
|
||||
run: tests/coverity-scan/run.sh
|
||||
env:
|
||||
COV_TOKEN: ${{ secrets.PJSIP_COVERITY_SCAN_TOKEN }}
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
name: "Coverity Scan (Manual)"
|
||||
|
||||
on: [workflow_dispatch, pull_request]
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
ubuntu-default-full-bundle:
|
||||
ubuntu-full-bundle:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: run.sh
|
||||
run: tests/coverity-scan/run.sh -t
|
||||
run: tests/coverity-scan/run.sh
|
||||
env:
|
||||
COV_TOKEN: ${{ secrets.PJSIP_COVERITY_SCAN_TOKEN }}
|
||||
|
|
|
@ -849,7 +849,7 @@ PJ_INLINE(void*) pj_memchr(const void *buf, int c, pj_size_t size)
|
|||
*
|
||||
* @param dst The destination string.
|
||||
* @param src The source string.
|
||||
* @param dst_size The size of the destination string.
|
||||
* @param dst_size The full size of the destination string buffer.
|
||||
*
|
||||
* @return The number of characters copied (not including the trailing NUL) or
|
||||
* -PJ_ETOOBIG if the destination buffer wasn't big enough,
|
||||
|
@ -865,7 +865,7 @@ PJ_DECL(int) pj_ansi_strxcpy(char *dst, const char *src, pj_size_t dst_size);
|
|||
*
|
||||
* @param dst The destination string.
|
||||
* @param src The source string.
|
||||
* @param dst_size The size of the destination string.
|
||||
* @param dst_size The full size of the destination string buffer.
|
||||
*
|
||||
* @return The number of characters copied (not including the trailing NUL) or
|
||||
* -PJ_ETOOBIG if the destination buffer wasn't big enough,
|
||||
|
@ -884,7 +884,7 @@ PJ_DECL(int) pj_ansi_strxcpy2(char *dst, const pj_str_t *src,
|
|||
*
|
||||
* @param dst The destination string.
|
||||
* @param src The source string.
|
||||
* @param dst_size The size of the destination string.
|
||||
* @param dst_size The full size of the destination string buffer.
|
||||
*
|
||||
* @return Final length of dst string (not including the trailing NUL) or
|
||||
* -PJ_ETOOBIG if the destination buffer wasn't big enough,
|
||||
|
|
|
@ -222,7 +222,7 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename,
|
|||
/* Store canonical name (possibly truncating the name) */
|
||||
if (res->ai_canonname) {
|
||||
pj_ansi_strxcpy(ai[i].ai_canonname, res->ai_canonname,
|
||||
sizeof(ai[i].ai_canonname));
|
||||
sizeof(ai[i].ai_canonname));
|
||||
} else {
|
||||
pj_ansi_strxcpy(ai[i].ai_canonname, nodecopy,
|
||||
sizeof(ai[i].ai_canonname));
|
||||
|
@ -305,7 +305,7 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename,
|
|||
|
||||
for (i=0; he.h_addr_list[i] && *count<max_count; ++i) {
|
||||
pj_ansi_strxcpy(ai[*count].ai_canonname, he.h_name,
|
||||
sizeof(ai[*count].ai_canonname));
|
||||
sizeof(ai[*count].ai_canonname));
|
||||
|
||||
ai[*count].ai_addr.ipv4.sin_family = PJ_AF_INET;
|
||||
pj_memcpy(&ai[*count].ai_addr.ipv4.sin_addr,
|
||||
|
|
|
@ -2381,14 +2381,14 @@ static pj_status_t ssl_do_handshake(pj_ssl_sock_t *ssock)
|
|||
len *= 2;
|
||||
if (len >= BUF_SIZE) len = BUF_SIZE;
|
||||
for (i = 0; i < len; i+=2)
|
||||
pj_ansi_snprintf(buf+i, len-i, "%02X", sid[i/2]);
|
||||
pj_ansi_snprintf(buf+i, sizeof(buf)-i, "%02X", sid[i/2]);
|
||||
buf[len] = '\0';
|
||||
PJ_LOG(5, (THIS_FILE, "Session id: %s", buf));
|
||||
|
||||
sctx = SSL_SESSION_get0_id_context(sess, &len);
|
||||
if (len >= BUF_SIZE) len = BUF_SIZE;
|
||||
for (i = 0; i < len; i++)
|
||||
pj_ansi_snprintf(buf + i, len-i, "%d", sctx[i]);
|
||||
pj_ansi_snprintf(buf + i, sizeof(buf)-i, "%d", sctx[i]);
|
||||
buf[len] = '\0';
|
||||
PJ_LOG(5, (THIS_FILE, "Session id context: %s", buf));
|
||||
}
|
||||
|
|
|
@ -295,37 +295,42 @@ static int verify_strxcpy(const char *src, int dst_size, int exp_ret,
|
|||
const char *exp_dst)
|
||||
{
|
||||
char dst[6];
|
||||
char GUARD = '@';
|
||||
const char GUARDS[2] = {'@', '\0'};
|
||||
int i, ret;
|
||||
|
||||
PJ_ASSERT_RETURN(src && dst_size <= 5, -700);
|
||||
|
||||
memset(dst, GUARD, sizeof(dst));
|
||||
for (int ig=0; ig<sizeof(GUARDS); ++ig) {
|
||||
char GUARD = GUARDS[ig];
|
||||
|
||||
ret = pj_ansi_strxcpy(dst, src, dst_size);
|
||||
memset(dst, GUARD, sizeof(dst));
|
||||
|
||||
/* verify return value */
|
||||
if (ret != exp_ret) {
|
||||
PJ_LOG(3,("", " strxcpy \"%s\", dst_size=%d: ret %d != %d",
|
||||
src, dst_size, ret, exp_ret));
|
||||
return -704;
|
||||
}
|
||||
ret = pj_ansi_strxcpy(dst, src, dst_size);
|
||||
|
||||
/* expected dst content */
|
||||
if (exp_dst) {
|
||||
if (strcmp(dst, exp_dst)) {
|
||||
PJ_LOG(3,("", " strxcpy \"%s\", dst_size=%d: dst content mismatch: \"%s\"!=\"%s\"",
|
||||
src, dst_size, dst, exp_dst));
|
||||
return -708;
|
||||
/* verify return value */
|
||||
if (ret != exp_ret) {
|
||||
PJ_LOG(3,("", " strxcpy \"%s\", dst_size=%d: ret %d != %d",
|
||||
src, dst_size, ret, exp_ret));
|
||||
return -704;
|
||||
}
|
||||
}
|
||||
|
||||
/* verify not writing pass buffer */
|
||||
for (i=exp_dst?strlen(exp_dst)+1:0; i<sizeof(dst); ++i) {
|
||||
if (dst[i] != GUARD) {
|
||||
PJ_LOG(3,("", " strxcpy \"%s\", dst_size=%d: overflow at %d",
|
||||
src, dst_size, i));
|
||||
return -710;
|
||||
/* expected dst content */
|
||||
if (exp_dst) {
|
||||
if (strcmp(dst, exp_dst)) {
|
||||
PJ_LOG(3,("", " strxcpy \"%s\", dst_size=%d: "
|
||||
"dst content mismatch: \"%s\"!=\"%s\"",
|
||||
src, dst_size, dst, exp_dst));
|
||||
return -708;
|
||||
}
|
||||
}
|
||||
|
||||
/* verify not writing pass buffer */
|
||||
for (i=exp_dst?strlen(exp_dst)+1:0; i<(int)sizeof(dst); ++i) {
|
||||
if (dst[i] != GUARD) {
|
||||
PJ_LOG(3,("", " strxcpy \"%s\", dst_size=%d: overflow at %d",
|
||||
src, dst_size, i));
|
||||
return -710;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -394,41 +399,47 @@ static int verify_strxcpy2(const pj_str_t *src, int dst_size, int exp_ret,
|
|||
const char *exp_dst)
|
||||
{
|
||||
char dst[6];
|
||||
char GUARD = '@';
|
||||
const char GUARDS[2] = {'@', '\0'};
|
||||
int i, ret;
|
||||
|
||||
PJ_ASSERT_RETURN(src && dst_size <= 5, -720);
|
||||
|
||||
memset(dst, GUARD, sizeof(dst));
|
||||
for (int ig=0; ig<sizeof(GUARDS); ++ig) {
|
||||
char GUARD = GUARDS[ig];
|
||||
|
||||
ret = pj_ansi_strxcpy2(dst, src, dst_size);
|
||||
memset(dst, GUARD, sizeof(dst));
|
||||
|
||||
/* verify return value */
|
||||
if (ret != exp_ret) {
|
||||
PJ_LOG(3,("", " strxcpy2 \"%.*s\" slen=%ld, dst_size=%d: ret %d!=%d",
|
||||
(int)src->slen, src->ptr, src->slen, dst_size, ret, exp_ret));
|
||||
return -724;
|
||||
}
|
||||
ret = pj_ansi_strxcpy2(dst, src, dst_size);
|
||||
|
||||
/* expected dst content */
|
||||
if (exp_dst) {
|
||||
if (strcmp(dst, exp_dst)) {
|
||||
/* verify return value */
|
||||
if (ret != exp_ret) {
|
||||
PJ_LOG(3,("", " strxcpy2 \"%.*s\" slen=%ld, dst_size=%d: "
|
||||
"dst content mismatch: \"%s\"!=\"%s\"",
|
||||
(int)src->slen, src->ptr, src->slen, dst_size, dst,
|
||||
exp_dst));
|
||||
return -726;
|
||||
"ret %d!=%d",
|
||||
(int)src->slen, src->ptr, src->slen, dst_size,
|
||||
ret, exp_ret));
|
||||
return -724;
|
||||
}
|
||||
}
|
||||
|
||||
/* verify not writing pass buffer */
|
||||
for (i=dst_size; i<sizeof(dst); ++i) {
|
||||
if (dst[i] != GUARD) {
|
||||
PJ_LOG(3,("", " strxcpy2 \"%.*s\" slen=%ld, dst_size=%d: "
|
||||
"overflow at %d (chr %d)",
|
||||
(int)src->slen, src->ptr, src->slen, dst_size, i,
|
||||
(char)(dst[i] & 0xFF)));
|
||||
return -728;
|
||||
/* expected dst content */
|
||||
if (exp_dst) {
|
||||
if (strcmp(dst, exp_dst)) {
|
||||
PJ_LOG(3,("", " strxcpy2 \"%.*s\" slen=%ld, dst_size=%d: "
|
||||
"dst content mismatch: \"%s\"!=\"%s\"",
|
||||
(int)src->slen, src->ptr, src->slen, dst_size, dst,
|
||||
exp_dst));
|
||||
return -726;
|
||||
}
|
||||
}
|
||||
|
||||
/* verify not writing pass buffer */
|
||||
for (i=dst_size; i<sizeof(dst); ++i) {
|
||||
if (dst[i] != GUARD) {
|
||||
PJ_LOG(3,("", " strxcpy2 \"%.*s\" slen=%ld, dst_size=%d: "
|
||||
"overflow at %d (chr %d)",
|
||||
(int)src->slen, src->ptr, src->slen, dst_size, i,
|
||||
(char)(dst[i] & 0xFF)));
|
||||
return -728;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -514,45 +525,49 @@ static int verify_strxcat(const char *cdst, const char *src, int dst_size,
|
|||
int exp_ret, const char *exp_dst)
|
||||
{
|
||||
char dst[6];
|
||||
char GUARD = '@';
|
||||
const char GUARDS[2] = {'@', '\0'};
|
||||
int i, ret;
|
||||
|
||||
PJ_ASSERT_RETURN(src && strlen(cdst) <= 4, -730);
|
||||
PJ_ASSERT_RETURN(strlen(cdst) < dst_size ||
|
||||
(strlen(cdst)==0 && dst_size==0), -731);
|
||||
|
||||
memset(dst, GUARD, sizeof(dst));
|
||||
if (dst_size) {
|
||||
ret = pj_ansi_strxcpy(dst, cdst, dst_size);
|
||||
PJ_ASSERT_RETURN(ret==strlen(cdst), -732);
|
||||
}
|
||||
|
||||
ret = pj_ansi_strxcat(dst, src, dst_size);
|
||||
|
||||
/* verify return value */
|
||||
if (ret != exp_ret) {
|
||||
PJ_LOG(3,("", " strxcat \"%s\", \"%s\", dst_size=%d: ret %d!=%d",
|
||||
cdst, src, dst_size, ret, exp_ret));
|
||||
return -734;
|
||||
}
|
||||
|
||||
/* expected dst content */
|
||||
if (exp_dst) {
|
||||
if (strcmp(dst, exp_dst)) {
|
||||
PJ_LOG(3,("", " strxcat \"%s\", \"%s\", dst_size=%d: "
|
||||
"dst content mismatch: \"%s\"!=\"%s\"",
|
||||
cdst, src, dst_size, dst, exp_dst));
|
||||
return -736;
|
||||
for (int ig=0; ig<sizeof(GUARDS); ++ig) {
|
||||
char GUARD = GUARDS[ig];
|
||||
|
||||
memset(dst, GUARD, sizeof(dst));
|
||||
if (dst_size) {
|
||||
ret = pj_ansi_strxcpy(dst, cdst, dst_size);
|
||||
PJ_ASSERT_RETURN(ret==strlen(cdst), -732);
|
||||
}
|
||||
}
|
||||
|
||||
/* verify not writing past buffer */
|
||||
for (i=exp_dst?strlen(exp_dst)+1:0; i<sizeof(dst); ++i) {
|
||||
if (dst[i] != GUARD) {
|
||||
PJ_LOG(3,("", " strxcat \"%s\", \"%s\", dst_size=%d: "
|
||||
"overflow at %d",
|
||||
cdst, src, dst_size, i));
|
||||
return -738;
|
||||
ret = pj_ansi_strxcat(dst, src, dst_size);
|
||||
|
||||
/* verify return value */
|
||||
if (ret != exp_ret) {
|
||||
PJ_LOG(3,("", " strxcat \"%s\", \"%s\", dst_size=%d: ret %d!=%d",
|
||||
cdst, src, dst_size, ret, exp_ret));
|
||||
return -734;
|
||||
}
|
||||
|
||||
/* expected dst content */
|
||||
if (exp_dst) {
|
||||
if (strcmp(dst, exp_dst)) {
|
||||
PJ_LOG(3,("", " strxcat \"%s\", \"%s\", dst_size=%d: "
|
||||
"dst content mismatch: \"%s\"!=\"%s\"",
|
||||
cdst, src, dst_size, dst, exp_dst));
|
||||
return -736;
|
||||
}
|
||||
}
|
||||
|
||||
/* verify not writing past buffer */
|
||||
for (i=exp_dst?strlen(exp_dst)+1:0; i<(int)sizeof(dst); ++i) {
|
||||
if (dst[i] != GUARD) {
|
||||
PJ_LOG(3,("", " strxcat \"%s\", \"%s\", dst_size=%d: "
|
||||
"overflow at %d",
|
||||
cdst, src, dst_size, i));
|
||||
return -738;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ static void build_dev_info(UINT deviceId, struct wmme_dev_info *wdi,
|
|||
/* Device Name */
|
||||
if (deviceId==WAVE_MAPPER) {
|
||||
pj_ansi_strxcpy(wdi->info.name, "Wave mapper",
|
||||
sizeof(wdi->info.name));
|
||||
sizeof(wdi->info.name));
|
||||
} else {
|
||||
const pj_char_t *szPname = WIC_WOC(wic, woc, szPname);
|
||||
PJ_DECL_ANSI_TEMP_BUF(wTmp, sizeof(wdi->info.name));
|
||||
|
|
|
@ -283,7 +283,7 @@ static void reset_dev_info(struct avi_dev_info *adi)
|
|||
/* Fill up with *dummy" device info */
|
||||
pj_ansi_strxcpy(adi->info.name, "AVI Player", sizeof(adi->info.name));
|
||||
pj_ansi_strxcpy(adi->info.driver, DRIVER_NAME,
|
||||
sizeof(adi->info.driver));
|
||||
sizeof(adi->info.driver));
|
||||
adi->info.dir = PJMEDIA_DIR_CAPTURE;
|
||||
adi->info.has_callback = PJ_FALSE;
|
||||
}
|
||||
|
@ -489,9 +489,9 @@ PJ_DEF(pj_status_t) pjmedia_avi_dev_alloc( pjmedia_vid_dev_factory *f,
|
|||
|
||||
/* Init device info */
|
||||
pj_ansi_strxcpy(adi->info.name, adi->title.ptr,
|
||||
sizeof(adi->info.name));
|
||||
sizeof(adi->info.name));
|
||||
pj_ansi_strxcpy(adi->info.driver, DRIVER_NAME,
|
||||
sizeof(adi->info.driver));
|
||||
sizeof(adi->info.driver));
|
||||
adi->info.dir = PJMEDIA_DIR_CAPTURE;
|
||||
adi->info.has_callback = PJ_FALSE;
|
||||
|
||||
|
|
|
@ -202,9 +202,9 @@ static pj_status_t cbar_factory_init(pjmedia_vid_dev_factory *f)
|
|||
ddi = &cf->dev_info[0];
|
||||
pj_bzero(ddi, sizeof(*ddi));
|
||||
pj_ansi_strxcpy(ddi->info.name, "Colorbar generator",
|
||||
sizeof(ddi->info.name));
|
||||
sizeof(ddi->info.name));
|
||||
pj_ansi_strxcpy(ddi->info.driver, "Colorbar",
|
||||
sizeof(ddi->info.driver));
|
||||
sizeof(ddi->info.driver));
|
||||
ddi->info.dir = PJMEDIA_DIR_CAPTURE;
|
||||
ddi->info.has_callback = PJ_FALSE;
|
||||
|
||||
|
@ -221,9 +221,9 @@ static pj_status_t cbar_factory_init(pjmedia_vid_dev_factory *f)
|
|||
ddi = &cf->dev_info[1];
|
||||
pj_bzero(ddi, sizeof(*ddi));
|
||||
pj_ansi_strxcpy(ddi->info.name, "Colorbar-active",
|
||||
sizeof(ddi->info.name));
|
||||
sizeof(ddi->info.name));
|
||||
pj_ansi_strxcpy(ddi->info.driver, "Colorbar",
|
||||
sizeof(ddi->info.driver));
|
||||
sizeof(ddi->info.driver));
|
||||
ddi->info.dir = PJMEDIA_DIR_CAPTURE;
|
||||
ddi->info.has_callback = PJ_TRUE;
|
||||
|
||||
|
|
|
@ -362,10 +362,10 @@ static pj_status_t darwin_factory_refresh(pjmedia_vid_dev_factory *f)
|
|||
qdi = &qf->dev_info[qf->dev_count++];
|
||||
pj_bzero(qdi, sizeof(*qdi));
|
||||
pj_ansi_strxcpy(qdi->info.name,
|
||||
[device.localizedName UTF8String],
|
||||
sizeof(qdi->info.name));
|
||||
[device.localizedName UTF8String],
|
||||
sizeof(qdi->info.name));
|
||||
pj_ansi_strxcpy(qdi->info.driver, "AVF",
|
||||
sizeof(qdi->info.driver));
|
||||
sizeof(qdi->info.driver));
|
||||
qdi->info.dir = PJMEDIA_DIR_CAPTURE;
|
||||
qdi->info.has_callback = PJ_FALSE;
|
||||
#if TARGET_OS_IPHONE
|
||||
|
|
|
@ -505,9 +505,9 @@ static pj_status_t dshow_factory_refresh(pjmedia_vid_dev_factory *f)
|
|||
ddi = &df->dev_info[df->dev_count++];
|
||||
pj_bzero(ddi, sizeof(*ddi));
|
||||
pj_ansi_strxcpy(ddi->info.name, "Video Mixing Renderer",
|
||||
sizeof(ddi->info.name));
|
||||
sizeof(ddi->info.name));
|
||||
pj_ansi_strxcpy(ddi->info.driver, "dshow",
|
||||
sizeof(ddi->info.driver));
|
||||
sizeof(ddi->info.driver));
|
||||
ddi->info.driver[sizeof(ddi->info.driver)-1] = '\0';
|
||||
ddi->info.dir = PJMEDIA_DIR_RENDER;
|
||||
ddi->info.has_callback = PJ_FALSE;
|
||||
|
|
|
@ -468,7 +468,7 @@ static pj_status_t ffmpeg_factory_refresh(pjmedia_vid_dev_factory *f)
|
|||
info = &ff->dev_info[ff->dev_count++];
|
||||
pj_bzero(info, sizeof(*info));
|
||||
pj_ansi_strxcpy(info->base.name, "default",
|
||||
sizeof(info->base.name));
|
||||
sizeof(info->base.name));
|
||||
pj_ansi_snprintf(info->base.driver, sizeof(info->base.driver),
|
||||
"ffmpeg %s", p->name);
|
||||
|
||||
|
|
|
@ -494,21 +494,21 @@ static pj_status_t sdl_factory_init(pjmedia_vid_dev_factory *f)
|
|||
ddi = &sf->dev_info[0];
|
||||
pj_bzero(ddi, sizeof(*ddi));
|
||||
pj_ansi_strxcpy(ddi->info.name, "SDL renderer",
|
||||
sizeof(ddi->info.name));
|
||||
sizeof(ddi->info.name));
|
||||
ddi->info.fmt_cnt = PJ_ARRAY_SIZE(sdl_fmts);
|
||||
|
||||
#if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL
|
||||
ddi = &sf->dev_info[OPENGL_DEV_IDX];
|
||||
pj_bzero(ddi, sizeof(*ddi));
|
||||
pj_ansi_strxcpy(ddi->info.name, "SDL openGL renderer",
|
||||
sizeof(ddi->info.name));
|
||||
sizeof(ddi->info.name));
|
||||
ddi->info.fmt_cnt = 1;
|
||||
#endif /* PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL */
|
||||
|
||||
for (i = 0; i < sf->dev_count; i++) {
|
||||
ddi = &sf->dev_info[i];
|
||||
pj_ansi_strxcpy(ddi->info.driver, "SDL",
|
||||
sizeof(ddi->info.driver));
|
||||
sizeof(ddi->info.driver));
|
||||
ddi->info.dir = PJMEDIA_DIR_RENDER;
|
||||
ddi->info.has_callback = PJ_FALSE;
|
||||
ddi->info.caps = PJMEDIA_VID_DEV_CAP_FORMAT |
|
||||
|
|
|
@ -355,9 +355,9 @@ static pj_status_t v4l2_scan_devs(vid4lin_factory *f)
|
|||
|
||||
pj_ansi_strxcpy(pdi->dev_name, dev_name, sizeof(pdi->dev_name));
|
||||
pj_ansi_strxcpy(pdi->info.name, (char*)pdi->v4l2_cap.card,
|
||||
sizeof(pdi->info.name));
|
||||
sizeof(pdi->info.name));
|
||||
pj_ansi_strxcpy(pdi->info.driver, DRIVER_NAME,
|
||||
sizeof(pdi->info.driver));
|
||||
sizeof(pdi->info.driver));
|
||||
pdi->info.dir = PJMEDIA_DIR_CAPTURE;
|
||||
pdi->info.has_callback = PJ_FALSE;
|
||||
pdi->info.caps = PJMEDIA_VID_DEV_CAP_FORMAT;
|
||||
|
|
|
@ -126,7 +126,7 @@ PJ_DEF(pj_status_t) pjmedia_tp_adapter_create( pjmedia_endpt *endpt,
|
|||
adapter = PJ_POOL_ZALLOC_T(pool, struct tp_adapter);
|
||||
adapter->pool = pool;
|
||||
pj_ansi_strxcpy(adapter->base.name, pool->obj_name,
|
||||
sizeof(adapter->base.name));
|
||||
sizeof(adapter->base.name));
|
||||
adapter->base.type = (pjmedia_transport_type)
|
||||
(PJMEDIA_TRANSPORT_TYPE_USER + 1);
|
||||
adapter->base.op = &tp_adapter_op;
|
||||
|
|
|
@ -594,7 +594,9 @@ struct TsxStateEventSrc
|
|||
pj_status_t status; /**< Transport error status. */
|
||||
GenericData data; /**< Generic data. */
|
||||
|
||||
TsxStateEventSrc() : timer(NULL), status(), data(NULL) {}
|
||||
TsxStateEventSrc()
|
||||
: timer(NULL), status(PJ_SUCCESS), data(NULL)
|
||||
{}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -3519,7 +3519,7 @@ pj_status_t pjsua_acc_get_uac_addr(pjsua_acc_id acc_id,
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < PJ_ARRAY_SIZE(pjsua_var.tpdata); i++) {
|
||||
for (i = 0; i < (int)PJ_ARRAY_SIZE(pjsua_var.tpdata); i++) {
|
||||
if (tfla2_prm.ret_tp==(const void *)pjsua_var.tpdata[i].data.tp) {
|
||||
if (pjsua_var.tpdata[i].has_bound_addr) {
|
||||
pj_strdup(pool, &addr->host,
|
||||
|
|
|
@ -1772,7 +1772,7 @@ PJ_DEF(pj_status_t) pjsua_enum_snd_devs( pjmedia_snd_dev_info info[],
|
|||
if (status != PJ_SUCCESS)
|
||||
return status;
|
||||
|
||||
pj_memcpy(info[i].name, ai.name, sizeof(info[i].name));
|
||||
pj_ansi_strxcpy(info[i].name, ai.name, sizeof(info[i].name));
|
||||
info[i].input_count = ai.input_count;
|
||||
info[i].output_count = ai.output_count;
|
||||
info[i].default_samples_per_sec = ai.default_samples_per_sec;
|
||||
|
|
|
@ -695,7 +695,7 @@ static pj_status_t apply_call_setting(pjsua_call *call,
|
|||
/* If call is established or media channel hasn't been initialized,
|
||||
* reinit media channel.
|
||||
*/
|
||||
if (call-> inv &&
|
||||
if (call->inv &&
|
||||
((call->inv->state == PJSIP_INV_STATE_CONNECTING &&
|
||||
call->med_cnt == 0) ||
|
||||
(call->inv->state == PJSIP_INV_STATE_CONFIRMED) ||
|
||||
|
|
Loading…
Reference in New Issue