mirror of
https://github.com/Museum-of-Art-and-Digital-Entertainment/macross.git
synced 2024-06-12 21:29:51 +00:00
Use mkstemp instead of mktemp - mktemp is intrinsically unsafe.
This commit is contained in:
parent
29f102cdf1
commit
e60db078d2
|
@ -351,7 +351,7 @@ initializeStuff(int argc, char **argv)
|
||||||
installCommandLineDefineSymbols();
|
installCommandLineDefineSymbols();
|
||||||
|
|
||||||
if (listingOn) {
|
if (listingOn) {
|
||||||
if ((saveFileForPass2 = fopen(mktemp(pass2SourceFileName),
|
if ((saveFileForPass2 = fopen(mkstemp(pass2SourceFileName),
|
||||||
"w+")) == NULL) {
|
"w+")) == NULL) {
|
||||||
fatalSystemError(UNABLE_TO_OPEN_PASS_2_FILE_ERROR,
|
fatalSystemError(UNABLE_TO_OPEN_PASS_2_FILE_ERROR,
|
||||||
pass2SourceFileName);
|
pass2SourceFileName);
|
||||||
|
@ -360,7 +360,7 @@ initializeStuff(int argc, char **argv)
|
||||||
unlink(pass2SourceFileName); /* will take effect on
|
unlink(pass2SourceFileName); /* will take effect on
|
||||||
program exit */
|
program exit */
|
||||||
|
|
||||||
if ((indexFileForPass2 = fopen(mktemp(pass2IndexFileName),
|
if ((indexFileForPass2 = fopen(mkstemp(pass2IndexFileName),
|
||||||
"w+")) == NULL) {
|
"w+")) == NULL) {
|
||||||
fatalSystemError(UNABLE_TO_OPEN_PASS_2_FILE_ERROR,
|
fatalSystemError(UNABLE_TO_OPEN_PASS_2_FILE_ERROR,
|
||||||
pass2IndexFileName);
|
pass2IndexFileName);
|
||||||
|
@ -370,7 +370,7 @@ initializeStuff(int argc, char **argv)
|
||||||
program exit */
|
program exit */
|
||||||
|
|
||||||
if (expandMacros) {
|
if (expandMacros) {
|
||||||
if ((macroFileForPass2 = fopen(mktemp(
|
if ((macroFileForPass2 = fopen(mkstemp(
|
||||||
pass2MacroExpansionFileName),"w+")) == NULL) {
|
pass2MacroExpansionFileName),"w+")) == NULL) {
|
||||||
fatalSystemError(
|
fatalSystemError(
|
||||||
UNABLE_TO_OPEN_PASS_2_FILE_ERROR,
|
UNABLE_TO_OPEN_PASS_2_FILE_ERROR,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user