sjanc commented on issue #1152: native hal_flash; use mktemp() instead of 
tmpnam() to generate name for temp flash file.
URL: https://github.com/apache/mynewt-core/pull/1152#issuecomment-393866024
 
 
   From man 3 mktemp :-)
   
   BUGS
          Never  use  mktemp().  Some implementations follow 4.3BSD and replace 
XXXXXX by the current process ID and a single letter, so that at most 26 
different names can be returned.  Since on the one hand the names
          are easy to guess, and on the other hand there is a race between 
testing whether the name exists and opening the file, every use of mktemp() is 
a  security  risk.   The  race  is  avoided  by  mkstemp(3)  and
          mkdtemp(3).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to