Merge pull request #374 from signalwire/su_taglist

[sofia-sip] scan-build: Fix "Called function pointer is null (null dereference)" in t_filter() of su_taglist.c
This commit is contained in:
Andrey Volk 2020-02-16 04:29:59 +04:00 committed by GitHub
commit 9cf6521873
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -485,8 +485,9 @@ tagi_t *t_filter(tagi_t *dst,
size_t d = 0;
for (f = filter; f; f = t_next(f)) {
if (TAG_TYPE_OF(f)->tt_filter)
d += (size_t)TAG_TYPE_OF(f)->tt_filter(NULL, f, src, bb);
tag_type_t tt_f = TAG_TYPE_OF(f);
if (tt_f->tt_filter)
d += (size_t)tt_f->tt_filter(NULL, f, src, bb);
else if (tt == f->t_tag) {
d += t_len(src);
*bb = (char *)*bb + t_xtra(src, (size_t)*bb);