Menu

#10 the use of `mktemp' is dangerous, better use `mkstemp'

master
closed-fixed
tbeu
None
5
2021-04-10
2012-03-13
Anonymous
No

When I link against matio-1.3.4, I get the following linker warning:

matio-1.3.4/src/mat.c:552: warning: the use of `mktemp' is dangerous, better use `mkstemp'

The manpage for mktemp states: "Never use mktemp()." It is a drop-in replacement to use mkstemp, so please switch to the safer version.

Discussion

  • Chad Smith

    Chad Smith - 2014-12-08

    I have fixed this bug. Can a developer contact me with info on how to submit my changes to be merged?

     
    • tbeu

      tbeu - 2015-12-26

      You are welcome to submit a git pull request to my repo at https://github.com/tbeu/matio Thank you!

       
  • tbeu

    tbeu - 2016-01-10
    • Group: 1.3.4 --> master
     
  • tbeu

    tbeu - 2017-12-19

    It is a drop-in replacement to use mkstemp

    It is not. mkstemp returns a file descriptor, however (as of hdf5 1.8.20 or 1.10.1) there is no HDF5 API function that can deal with such a file descriptor. As long as this is the case the issue cannot be fixed in a clean way.

     
  • tbeu

    tbeu - 2017-12-19
    • status: open --> pending
    • assigned_to: tbeu
     
  • tbeu

    tbeu - 2021-04-10

    Resolved by v1.5.18.

     
  • tbeu

    tbeu - 2021-04-10
    • status: pending --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB