[vlc-devel] [PATCH v2 0/13] mkstemp [WIP - some help needed]

Lyndon Brown jnqnfe at gmail.com
Tue Oct 6 07:55:29 CEST 2020


This patch series addresses the mistaken previous submission of
incomplete work solving the security warnings around use of tempnam(),
and furthermore the temp path issues with existing use of mkstemp().

 - Adds helper for getting the correct platform-specific temp
directory.
 - Puts it to use with existing use of vlc_mkstemp().
 - Adds a further helper to de-duplicate and simplify code.
 - Puts that to use.
 - Converts use of insecure tempnam() function to use these helpers.

[Help needed]: It's currently marked WIP because:
 - The config_GetTempPath() function in the first commit needs filling
in for win-uap. It would be helpful if someone already familiar with
the code for that platform could do this.
 - I've tested compiling on Linux, but needs testing on other platforms
(can others please help with that (or help me setup CI)).
 - Possibly needs some runtime testing of the code paths making use of
the new helpers before it'll be accepted, so need to figure out
suitable tests to provoke their use, or construct a suitable artificial
use.

patches attached (including zip), previews to follow, tree: 
https://code.videolan.org/jnqnfe/vlc/-/tree/mkstemp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01.patch
Type: text/x-patch
Size: 3041 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02.patch
Type: text/x-patch
Size: 928 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03.patch
Type: text/x-patch
Size: 2612 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04.patch
Type: text/x-patch
Size: 1761 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 05.patch
Type: text/x-patch
Size: 1385 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 06.patch
Type: text/x-patch
Size: 4340 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 07.patch
Type: text/x-patch
Size: 2321 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 08.patch
Type: text/x-patch
Size: 1684 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 09.patch
Type: text/x-patch
Size: 3709 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10.patch
Type: text/x-patch
Size: 1396 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 11.patch
Type: text/x-patch
Size: 3248 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12.patch
Type: text/x-patch
Size: 1286 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 13.patch
Type: text/x-patch
Size: 1381 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: all.zip
Type: application/zip
Size: 13427 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201006/7e7e2cfb/attachment.zip>


More information about the vlc-devel mailing list