From 007f1b4745469f3f0254773f26ae0cb807ec7a0e Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 25 May 2008 15:11:19 +0000 Subject: [PATCH] Tue May 20 13:32:28 EDT 2008 Pekka.Pessi@nokia.com * su_taglist.c: fixed klocwork issues git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8623 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index a25a6e0a6d..36f537071e 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Sun May 25 11:10:29 EDT 2008 +Sun May 25 11:11:12 EDT 2008 diff --git a/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c b/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c index 25124edf70..80630e6968 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c +++ b/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c @@ -155,7 +155,7 @@ int t_snprintf(tagi_t const *t, char b[], size_t size) if (m < 0) return m; - if (m == 0 && (size_t)n < size) + if (m == 0 && 0 < n && (size_t)n < size) b[--n] = '\0'; return n + m; @@ -756,6 +756,8 @@ tagi_t *tl_vllist(tag_type_t tag, tag_value_t value, va_list ap) va_end(aq); t = rv = malloc(size); + if (rv == NULL) + return rv; tagi[0].t_tag = tag; tagi[0].t_value = value;