]> git.ipfire.org Git - thirdparty/asterisk.git/commit
voicemail: Fix various abuses of mkstemp
authorSean Bright <sean.bright@gmail.com>
Fri, 25 Aug 2017 18:44:35 +0000 (14:44 -0400)
committerSean Bright <sean.bright@gmail.com>
Fri, 25 Aug 2017 21:08:47 +0000 (16:08 -0500)
commit66388de98c33ef3726c15ef2ed028909eeb73623
tree41e4506355036ba351e995e122f470f7db45b441
parent3440a7404bc0b56e685d1f82a140045bc8d3a70f
voicemail: Fix various abuses of mkstemp

mkstemp() returns a unique filename, but appending an extension to that
filename does not guarantee uniqueness. Instead, use mkdtemp() and we
can put whatever extension we want on the files that we create inside
the directory.

In the case of app_minivm, we also now properly clean up any temporary
files that we create.

ASTERISK-20858 #close
Reported by: Walter Doekes

Change-Id: I30ad04f0e115f0b11693ff678ba5184d8b938e43
apps/app_minivm.c
apps/app_voicemail.c