]> 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:02:17 +0000 (17:02 -0400)
commit9e6efcace54f9bd7e762db2deea97b6bd0afae4e
tree3a6ae4522c711b839ff5c6e877a59a84010627fc
parent28857047da01fec681656802ea3f0981170ac9b1
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