Commit 24c2aa30 by Weiwen Liu Committed by Jeff Law

gcc.c (do_spec_1): Fix %O handling for secure temporary file creation.

8
        * gcc.c (do_spec_1): Fix %O handling for secure temporary file
        creation.

From-SVN: r21124
parent a5dd9832
...@@ -3610,10 +3610,21 @@ do_spec_1 (spec, inswitch, soft_matched_part) ...@@ -3610,10 +3610,21 @@ do_spec_1 (spec, inswitch, soft_matched_part)
t->next = temp_names; t->next = temp_names;
temp_names = t; temp_names = t;
} }
t->length = p - suffix; if (strncmp (suffix, "%O", 2) == 0)
t->suffix = save_string (suffix, p - suffix); {
t->unique = (c != 'g'); t->length = strlen(OBJECT_SUFFIX);
temp_filename = make_temp_file (suffix); t->suffix = save_string (OBJECT_SUFFIX,
strlen(OBJECT_SUFFIX));
t->unique = (c != 'g');
temp_filename = make_temp_file (OBJECT_SUFFIX);
}
else
{
t->length = p - suffix;
t->suffix = save_string (suffix, p - suffix);
t->unique = (c != 'g');
temp_filename = make_temp_file (suffix);
}
temp_filename_length = strlen (temp_filename); temp_filename_length = strlen (temp_filename);
t->filename = temp_filename; t->filename = temp_filename;
t->filename_length = temp_filename_length; t->filename_length = temp_filename_length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment