]> 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:37 +0000 (16:08 -0500)
commit41c04c34c429457a8418868842ae821705afecb6
treeccf36624c8328bdf62dc64b148f6c57afecae6ae
parent71c30877c1e6a07b33d91b58485b02ebff96f2c9
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