format.c: correct possible null pointer dereference
authorScott Griepentrog <sgriepentrog@digium.com>
Fri, 14 Feb 2014 21:29:31 +0000 (21:29 +0000)
committerScott Griepentrog <sgriepentrog@digium.com>
Fri, 14 Feb 2014 21:29:31 +0000 (21:29 +0000)
commitc41040fd4b9a4f14bbd0be30500361154d823595
treede43d7f583faf0f04a4f85c5a59159d156674bc2
parent3a55eb88d297da7392e75d629d7fbb2a5beeea9d
format.c: correct possible null pointer dereference

In ast_format_sdp_parse and ast_format_sdp_generate
the check checks for a valid interface and function
were potentially confusing, and hid an error in the
test of the presence of the function that is called
later.  This patch clears up and corrects the test.

Review: https://reviewboard.asterisk.org/r/3208/
(closes issue ASTERISK-23098)
Reported by: marcelloceschia
Patches:
     main_format.patch uploaded by marcelloceschia (license 6036)
 ASTERISK-23098.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 408137 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 408138 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/format.c