[sofia-sip] Fix multiple issues reported by scan-build.

This commit is contained in:
Andrey Volk committed 2020-02-13 21:11:18 +04:00
1 parent 53c110ec51
commit 068f4c8524
14 files changed
+46 -14

No files matched your search

@@ -1756,7 +1756,7 @@ issize_t msg_unquoted_e(char *b, isize_t bsiz, char const *s)
size_t n = strcspn(s, "\"\\");
if (n == 0) {
if (e + 2 <= bsiz)
if (b && e + 2 <= bsiz)
b[e] = '\\', b[e + 1] = s[0];
e += 2;
s++;
@@ -1769,7 +1769,7 @@ issize_t msg_unquoted_e(char *b, isize_t bsiz, char const *s)
}
}
if (e < bsiz)
if (b && e < bsiz)
b[e] = '"';
e++;