]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Avoid a segfault on invalid format names
authorKinsey Moore <kmoore@digium.com>
Fri, 12 Oct 2012 21:56:59 +0000 (21:56 +0000)
committerKinsey Moore <kmoore@digium.com>
Fri, 12 Oct 2012 21:56:59 +0000 (21:56 +0000)
commit65d82246a97ba45b2b9a810cceae022124f4078a
tree905c8aeee0df23fdfd6da24c56da42fd4a1360ba
parent6f9104870e5d0a565d4c81dbd5acce018f020b05
Avoid a segfault on invalid format names

If a format name was not found by ast_getformatbyname, a NULL pointer
would be passed into ast_format_rate and immediately dereferenced.
This ensures that a valid pointer is used since the structure is
already allocated on the stack.

(closes issue DPH-523)
Reported-by: Steve Pitts
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_voicemail.c