diff options
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/samples/icedemo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pjsip-apps/src/samples/icedemo.c b/pjsip-apps/src/samples/icedemo.c index 4cb9f221..266b800a 100644 --- a/pjsip-apps/src/samples/icedemo.c +++ b/pjsip-apps/src/samples/icedemo.c @@ -517,7 +517,8 @@ static void icedemo_stop_session(void) #define PRINT(fmt, arg0, arg1, arg2, arg3, arg4, arg5) \ printed = pj_ansi_snprintf(p, maxlen - (p-buffer), \ fmt, arg0, arg1, arg2, arg3, arg4, arg5); \ - if (printed <= 0) return -PJ_ETOOSMALL; \ + if (printed <= 0 || printed >= (int)(maxlen - (p-buffer))) \ + return -PJ_ETOOSMALL; \ p += printed |