|
Line
Link Here
|
| 0 |
-- gcc-4.9.4/gcc/c/c-convert.c |
0 |
++ gcc-4.9.4-format-security/gcc/c/c-convert.c |
|
Lines 79-85
convert (tree type, tree expr)
Link Here
|
| 79 |
if ((invalid_conv_diag |
79 |
if ((invalid_conv_diag |
| 80 |
= targetm.invalid_conversion (TREE_TYPE (expr), type))) |
80 |
= targetm.invalid_conversion (TREE_TYPE (expr), type))) |
| 81 |
{ |
81 |
{ |
| 82 |
error (invalid_conv_diag); |
82 |
error ("%s", invalid_conv_diag); |
| 83 |
return error_mark_node; |
83 |
return error_mark_node; |
| 84 |
} |
84 |
} |
| 85 |
|
85 |
|
| 86 |
-- gcc-4.9.4/gcc/c/c-decl.c |
86 |
++ gcc-4.9.4-format-security/gcc/c/c-decl.c |
|
Lines 5699-5705
grokdeclarator (const struct c_declarato
Link Here
|
| 5699 |
errmsg = targetm.invalid_return_type (type); |
5699 |
errmsg = targetm.invalid_return_type (type); |
| 5700 |
if (errmsg) |
5700 |
if (errmsg) |
| 5701 |
{ |
5701 |
{ |
| 5702 |
error (errmsg); |
5702 |
error ("%s", errmsg); |
| 5703 |
type = integer_type_node; |
5703 |
type = integer_type_node; |
| 5704 |
} |
5704 |
} |
| 5705 |
|
5705 |
|
|
Lines 6480-6486
grokparms (struct c_arg_info *arg_info,
Link Here
|
| 6480 |
errmsg = targetm.invalid_parameter_type (type); |
6480 |
errmsg = targetm.invalid_parameter_type (type); |
| 6481 |
if (errmsg) |
6481 |
if (errmsg) |
| 6482 |
{ |
6482 |
{ |
| 6483 |
error (errmsg); |
6483 |
error ("%s", errmsg); |
| 6484 |
TREE_VALUE (typelt) = error_mark_node; |
6484 |
TREE_VALUE (typelt) = error_mark_node; |
| 6485 |
TREE_TYPE (parm) = error_mark_node; |
6485 |
TREE_TYPE (parm) = error_mark_node; |
| 6486 |
arg_types = NULL_TREE; |
6486 |
arg_types = NULL_TREE; |
| 6487 |
-- gcc-4.9.4/gcc/c/c-typeck.c |
6487 |
++ gcc-4.9.4-format-security/gcc/c/c-typeck.c |
|
Lines 3300-3306
convert_arguments (location_t loc, vec<l
Link Here
|
| 3300 |
else if ((invalid_func_diag = |
3300 |
else if ((invalid_func_diag = |
| 3301 |
targetm.calls.invalid_arg_for_unprototyped_fn (typelist, fundecl, val))) |
3301 |
targetm.calls.invalid_arg_for_unprototyped_fn (typelist, fundecl, val))) |
| 3302 |
{ |
3302 |
{ |
| 3303 |
error (invalid_func_diag); |
3303 |
error ("%s", invalid_func_diag); |
| 3304 |
return -1; |
3304 |
return -1; |
| 3305 |
} |
3305 |
} |
| 3306 |
else |
3306 |
else |
|
Lines 3799-3805
build_unary_op (location_t location,
Link Here
|
| 3799 |
if ((invalid_op_diag |
3799 |
if ((invalid_op_diag |
| 3800 |
= targetm.invalid_unary_op (code, TREE_TYPE (xarg)))) |
3800 |
= targetm.invalid_unary_op (code, TREE_TYPE (xarg)))) |
| 3801 |
{ |
3801 |
{ |
| 3802 |
error_at (location, invalid_op_diag); |
3802 |
error_at (location, "%s", invalid_op_diag); |
| 3803 |
return error_mark_node; |
3803 |
return error_mark_node; |
| 3804 |
} |
3804 |
} |
| 3805 |
|
3805 |
|
|
Lines 6420-6426
error_init (const char *gmsgid)
Link Here
|
| 6420 |
char *ofwhat; |
6420 |
char *ofwhat; |
| 6421 |
|
6421 |
|
| 6422 |
/* The gmsgid may be a format string with %< and %>. */ |
6422 |
/* The gmsgid may be a format string with %< and %>. */ |
| 6423 |
error (gmsgid); |
6423 |
error ("%s", gmsgid); |
| 6424 |
ofwhat = print_spelling ((char *) alloca (spelling_length () + 1)); |
6424 |
ofwhat = print_spelling ((char *) alloca (spelling_length () + 1)); |
| 6425 |
if (*ofwhat) |
6425 |
if (*ofwhat) |
| 6426 |
error ("(near initialization for %qs)", ofwhat); |
6426 |
error ("(near initialization for %qs)", ofwhat); |
|
Lines 6437-6443
pedwarn_init (location_t location, int o
Link Here
|
| 6437 |
char *ofwhat; |
6437 |
char *ofwhat; |
| 6438 |
|
6438 |
|
| 6439 |
/* The gmsgid may be a format string with %< and %>. */ |
6439 |
/* The gmsgid may be a format string with %< and %>. */ |
| 6440 |
pedwarn (location, opt, gmsgid); |
6440 |
pedwarn (location, opt, "%s", gmsgid); |
| 6441 |
ofwhat = print_spelling ((char *) alloca (spelling_length () + 1)); |
6441 |
ofwhat = print_spelling ((char *) alloca (spelling_length () + 1)); |
| 6442 |
if (*ofwhat) |
6442 |
if (*ofwhat) |
| 6443 |
pedwarn (location, opt, "(near initialization for %qs)", ofwhat); |
6443 |
pedwarn (location, opt, "(near initialization for %qs)", ofwhat); |
|
Lines 6455-6461
warning_init (int opt, const char *gmsgi
Link Here
|
| 6455 |
char *ofwhat; |
6455 |
char *ofwhat; |
| 6456 |
|
6456 |
|
| 6457 |
/* The gmsgid may be a format string with %< and %>. */ |
6457 |
/* The gmsgid may be a format string with %< and %>. */ |
| 6458 |
warning (opt, gmsgid); |
6458 |
warning (opt, "%s", gmsgid); |
| 6459 |
ofwhat = print_spelling ((char *) alloca (spelling_length () + 1)); |
6459 |
ofwhat = print_spelling ((char *) alloca (spelling_length () + 1)); |
| 6460 |
if (*ofwhat) |
6460 |
if (*ofwhat) |
| 6461 |
warning (opt, "(near initialization for %qs)", ofwhat); |
6461 |
warning (opt, "(near initialization for %qs)", ofwhat); |
|
Lines 10114-10120
build_binary_op (location_t location, en
Link Here
|
| 10114 |
if ((invalid_op_diag |
10114 |
if ((invalid_op_diag |
| 10115 |
= targetm.invalid_binary_op (code, type0, type1))) |
10115 |
= targetm.invalid_binary_op (code, type0, type1))) |
| 10116 |
{ |
10116 |
{ |
| 10117 |
error_at (location, invalid_op_diag); |
10117 |
error_at (location, "%s", invalid_op_diag); |
| 10118 |
return error_mark_node; |
10118 |
return error_mark_node; |
| 10119 |
} |
10119 |
} |
| 10120 |
|
10120 |
|
| 10121 |
-- gcc-4.9.4/gcc/c-family/c-common.c |
10121 |
++ gcc-4.9.4-format-security/gcc/c-family/c-common.c |
|
Lines 9604-9614
c_parse_error (const char *gmsgid, enum
Link Here
|
| 9604 |
message = NULL; |
9604 |
message = NULL; |
| 9605 |
} |
9605 |
} |
| 9606 |
else |
9606 |
else |
| 9607 |
error (gmsgid); |
9607 |
error ("%s", gmsgid); |
| 9608 |
|
9608 |
|
| 9609 |
if (message) |
9609 |
if (message) |
| 9610 |
{ |
9610 |
{ |
| 9611 |
error (message); |
9611 |
error ("%s", message); |
| 9612 |
free (message); |
9612 |
free (message); |
| 9613 |
} |
9613 |
} |
| 9614 |
#undef catenate_messages |
9614 |
#undef catenate_messages |
| 9615 |
-- gcc-4.9.4/gcc/collect2.c |
9615 |
++ gcc-4.9.4-format-security/gcc/collect2.c |
|
Lines 1992-1998
collect_execute (const char *prog, char
Link Here
|
| 1992 |
fatal_error ("%s: %m", _(errmsg)); |
1992 |
fatal_error ("%s: %m", _(errmsg)); |
| 1993 |
} |
1993 |
} |
| 1994 |
else |
1994 |
else |
| 1995 |
fatal_error (errmsg); |
1995 |
fatal_error ("%s", errmsg); |
| 1996 |
} |
1996 |
} |
| 1997 |
|
1997 |
|
| 1998 |
free (response_arg); |
1998 |
free (response_arg); |
|
Lines 2543-2549
scan_prog_file (const char *prog_name, s
Link Here
|
| 2543 |
fatal_error ("%s: %m", _(errmsg)); |
2543 |
fatal_error ("%s: %m", _(errmsg)); |
| 2544 |
} |
2544 |
} |
| 2545 |
else |
2545 |
else |
| 2546 |
fatal_error (errmsg); |
2546 |
fatal_error ("%s", errmsg); |
| 2547 |
} |
2547 |
} |
| 2548 |
|
2548 |
|
| 2549 |
int_handler = (void (*) (int)) signal (SIGINT, SIG_IGN); |
2549 |
int_handler = (void (*) (int)) signal (SIGINT, SIG_IGN); |
| 2550 |
-- gcc-4.9.4/gcc/cp/cvt.c |
2550 |
++ gcc-4.9.4-format-security/gcc/cp/cvt.c |
|
Lines 682-688
ocp_convert (tree type, tree expr, int c
Link Here
|
| 682 |
= targetm.invalid_conversion (TREE_TYPE (expr), type))) |
682 |
= targetm.invalid_conversion (TREE_TYPE (expr), type))) |
| 683 |
{ |
683 |
{ |
| 684 |
if (complain & tf_error) |
684 |
if (complain & tf_error) |
| 685 |
error (invalid_conv_diag); |
685 |
error ("%s", invalid_conv_diag); |
| 686 |
return error_mark_node; |
686 |
return error_mark_node; |
| 687 |
} |
687 |
} |
| 688 |
|
688 |
|
| 689 |
-- gcc-4.9.4/gcc/cp/decl.c |
689 |
++ gcc-4.9.4-format-security/gcc/cp/decl.c |
|
Lines 9543-9549
grokdeclarator (const cp_declarator *dec
Link Here
|
| 9543 |
errmsg = targetm.invalid_return_type (type); |
9543 |
errmsg = targetm.invalid_return_type (type); |
| 9544 |
if (errmsg) |
9544 |
if (errmsg) |
| 9545 |
{ |
9545 |
{ |
| 9546 |
error (errmsg); |
9546 |
error ("%s", errmsg); |
| 9547 |
type = integer_type_node; |
9547 |
type = integer_type_node; |
| 9548 |
} |
9548 |
} |
| 9549 |
|
9549 |
|
|
Lines 11120-11126
grokparms (tree parmlist, tree *parms)
Link Here
|
| 11120 |
if (type != error_mark_node |
11120 |
if (type != error_mark_node |
| 11121 |
&& (errmsg = targetm.invalid_parameter_type (type))) |
11121 |
&& (errmsg = targetm.invalid_parameter_type (type))) |
| 11122 |
{ |
11122 |
{ |
| 11123 |
error (errmsg); |
11123 |
error ("%s", errmsg); |
| 11124 |
type = error_mark_node; |
11124 |
type = error_mark_node; |
| 11125 |
TREE_TYPE (decl) = error_mark_node; |
11125 |
TREE_TYPE (decl) = error_mark_node; |
| 11126 |
} |
11126 |
} |
| 11127 |
-- gcc-4.9.4/gcc/cp/init.c |
11127 |
++ gcc-4.9.4-format-security/gcc/cp/init.c |
|
Lines 2399-2405
build_new_1 (vec<tree, va_gc> **placemen
Link Here
|
| 2399 |
msg = ("non-constant array new length must be specified " |
2399 |
msg = ("non-constant array new length must be specified " |
| 2400 |
"without parentheses around the type-id"); |
2400 |
"without parentheses around the type-id"); |
| 2401 |
pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location), |
2401 |
pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location), |
| 2402 |
OPT_Wvla, msg); |
2402 |
OPT_Wvla, "%s", msg); |
| 2403 |
} |
2403 |
} |
| 2404 |
else |
2404 |
else |
| 2405 |
return error_mark_node; |
2405 |
return error_mark_node; |
|
Lines 2408-2414
build_new_1 (vec<tree, va_gc> **placemen
Link Here
|
| 2408 |
if (VOID_TYPE_P (elt_type)) |
2408 |
if (VOID_TYPE_P (elt_type)) |
| 2409 |
{ |
2409 |
{ |
| 2410 |
if (complain & tf_error) |
2410 |
if (complain & tf_error) |
| 2411 |
error ("invalid type %<void%> for new"); |
2411 |
error ("%s", "invalid type %<void%> for new"); |
| 2412 |
return error_mark_node; |
2412 |
return error_mark_node; |
| 2413 |
} |
2413 |
} |
| 2414 |
|
2414 |
|
| 2415 |
-- gcc-4.9.4/gcc/cp/parser.c |
2415 |
++ gcc-4.9.4-format-security/gcc/cp/parser.c |
|
Lines 2668-2674
cp_parser_check_type_definition (cp_pars
Link Here
|
| 2668 |
{ |
2668 |
{ |
| 2669 |
/* Don't use `%s' to print the string, because quotations (`%<', `%>') |
2669 |
/* Don't use `%s' to print the string, because quotations (`%<', `%>') |
| 2670 |
in the message need to be interpreted. */ |
2670 |
in the message need to be interpreted. */ |
| 2671 |
error (parser->type_definition_forbidden_message); |
2671 |
error ("%s", parser->type_definition_forbidden_message); |
| 2672 |
return false; |
2672 |
return false; |
| 2673 |
} |
2673 |
} |
| 2674 |
return true; |
2674 |
return true; |
| 2675 |
-- gcc-4.9.4/gcc/cp/pt.c |
2675 |
++ gcc-4.9.4-format-security/gcc/cp/pt.c |
|
Lines 14227-14233
tsubst_copy_and_build (tree t,
Link Here
|
| 14227 |
&error_msg, |
14227 |
&error_msg, |
| 14228 |
input_location); |
14228 |
input_location); |
| 14229 |
if (error_msg) |
14229 |
if (error_msg) |
| 14230 |
error (error_msg); |
14230 |
error ("%s", error_msg); |
| 14231 |
if (!function_p && identifier_p (decl)) |
14231 |
if (!function_p && identifier_p (decl)) |
| 14232 |
{ |
14232 |
{ |
| 14233 |
if (complain & tf_error) |
14233 |
if (complain & tf_error) |
| 14234 |
-- gcc-4.9.4/gcc/cp/typeck.c |
14234 |
++ gcc-4.9.4-format-security/gcc/cp/typeck.c |
|
Lines 3993-3999
cp_build_binary_op (location_t location,
Link Here
|
| 3993 |
= targetm.invalid_binary_op (code, type0, type1))) |
3993 |
= targetm.invalid_binary_op (code, type0, type1))) |
| 3994 |
{ |
3994 |
{ |
| 3995 |
if (complain & tf_error) |
3995 |
if (complain & tf_error) |
| 3996 |
error (invalid_op_diag); |
3996 |
error ("%s", invalid_op_diag); |
| 3997 |
return error_mark_node; |
3997 |
return error_mark_node; |
| 3998 |
} |
3998 |
} |
| 3999 |
|
3999 |
|
|
Lines 5586-5592
cp_build_unary_op (enum tree_code code,
Link Here
|
| 5586 |
TREE_TYPE (xarg)))) |
5586 |
TREE_TYPE (xarg)))) |
| 5587 |
{ |
5587 |
{ |
| 5588 |
if (complain & tf_error) |
5588 |
if (complain & tf_error) |
| 5589 |
error (invalid_op_diag); |
5589 |
error ("%s", invalid_op_diag); |
| 5590 |
return error_mark_node; |
5590 |
return error_mark_node; |
| 5591 |
} |
5591 |
} |
| 5592 |
|
5592 |
|
| 5593 |
-- gcc-4.9.4/gcc/dwarf2asm.c |
5593 |
++ gcc-4.9.4-format-security/gcc/dwarf2asm.c |
|
Lines 164-170
dw2_asm_output_vms_delta (int size ATTRI
Link Here
|
| 164 |
#ifndef ASM_OUTPUT_DWARF_VMS_DELTA |
164 |
#ifndef ASM_OUTPUT_DWARF_VMS_DELTA |
| 165 |
/* VMS Delta is only special on ia64-vms, but this function also gets |
165 |
/* VMS Delta is only special on ia64-vms, but this function also gets |
| 166 |
called on alpha-vms so it has to do something sane. */ |
166 |
called on alpha-vms so it has to do something sane. */ |
| 167 |
dw2_asm_output_delta (size, lab1, lab2, comment); |
167 |
dw2_asm_output_delta (size, lab1, lab2, "%s", comment); |
| 168 |
#else |
168 |
#else |
| 169 |
ASM_OUTPUT_DWARF_VMS_DELTA (asm_out_file, size, lab1, lab2); |
169 |
ASM_OUTPUT_DWARF_VMS_DELTA (asm_out_file, size, lab1, lab2); |
| 170 |
if (flag_debug_asm && comment) |
170 |
if (flag_debug_asm && comment) |
| 171 |
-- gcc-4.9.4/gcc/fold-const.c |
171 |
++ gcc-4.9.4-format-security/gcc/fold-const.c |
|
Lines 312-318
fold_overflow_warning (const char* gmsgi
Link Here
|
| 312 |
} |
312 |
} |
| 313 |
} |
313 |
} |
| 314 |
else if (issue_strict_overflow_warning (wc)) |
314 |
else if (issue_strict_overflow_warning (wc)) |
| 315 |
warning (OPT_Wstrict_overflow, gmsgid); |
315 |
warning (OPT_Wstrict_overflow, "%s", gmsgid); |
| 316 |
} |
316 |
} |
| 317 |
|
317 |
|
| 318 |
/* Return true if the built-in mathematical function specified by CODE |
318 |
/* Return true if the built-in mathematical function specified by CODE |
| 319 |
-- gcc-4.9.4/gcc/fortran/arith.c |
319 |
++ gcc-4.9.4-format-security/gcc/fortran/arith.c |
|
Lines 1578-1584
eval_intrinsic (gfc_intrinsic_op op,
Link Here
|
| 1578 |
|
1578 |
|
| 1579 |
if (rc != ARITH_OK) |
1579 |
if (rc != ARITH_OK) |
| 1580 |
{ |
1580 |
{ |
| 1581 |
gfc_error (gfc_arith_error (rc), &op1->where); |
1581 |
gfc_error ("%s", gfc_arith_error (rc), &op1->where); |
| 1582 |
return NULL; |
1582 |
return NULL; |
| 1583 |
} |
1583 |
} |
| 1584 |
|
1584 |
|
| 1585 |
-- gcc-4.9.4/gcc/fortran/decl.c |
1585 |
++ gcc-4.9.4-format-security/gcc/fortran/decl.c |
|
Lines 2239-2245
kind_expr:
Link Here
|
| 2239 |
|
2239 |
|
| 2240 |
if (msg != NULL) |
2240 |
if (msg != NULL) |
| 2241 |
{ |
2241 |
{ |
| 2242 |
gfc_error (msg); |
2242 |
gfc_error ("%s", msg); |
| 2243 |
m = MATCH_ERROR; |
2243 |
m = MATCH_ERROR; |
| 2244 |
goto no_match; |
2244 |
goto no_match; |
| 2245 |
} |
2245 |
} |
|
Lines 2371-2377
match_char_kind (int * kind, int * is_is
Link Here
|
| 2371 |
*is_iso_c = e->ts.is_iso_c; |
2371 |
*is_iso_c = e->ts.is_iso_c; |
| 2372 |
if (msg != NULL) |
2372 |
if (msg != NULL) |
| 2373 |
{ |
2373 |
{ |
| 2374 |
gfc_error (msg); |
2374 |
gfc_error ("%s", msg); |
| 2375 |
m = MATCH_ERROR; |
2375 |
m = MATCH_ERROR; |
| 2376 |
goto no_match; |
2376 |
goto no_match; |
| 2377 |
} |
2377 |
} |
|
Lines 2867-2873
gfc_match_decl_type_spec (gfc_typespec *
Link Here
|
| 2867 |
|
2867 |
|
| 2868 |
/* Use upper case to save the actual derived-type symbol. */ |
2868 |
/* Use upper case to save the actual derived-type symbol. */ |
| 2869 |
gfc_get_symbol (dt_name, NULL, &dt_sym); |
2869 |
gfc_get_symbol (dt_name, NULL, &dt_sym); |
| 2870 |
dt_sym->name = gfc_get_string (sym->name); |
2870 |
dt_sym->name = gfc_get_string ("%s", sym->name); |
| 2871 |
head = sym->generic; |
2871 |
head = sym->generic; |
| 2872 |
intr = gfc_get_interface (); |
2872 |
intr = gfc_get_interface (); |
| 2873 |
intr->sym = dt_sym; |
2873 |
intr->sym = dt_sym; |
|
Lines 7610-7616
gfc_match_derived_decl (void)
Link Here
|
| 7610 |
gfc_get_symbol (gfc_get_string ("%c%s", |
7610 |
gfc_get_symbol (gfc_get_string ("%c%s", |
| 7611 |
(char) TOUPPER ((unsigned char) gensym->name[0]), |
7611 |
(char) TOUPPER ((unsigned char) gensym->name[0]), |
| 7612 |
&gensym->name[1]), NULL, &sym); |
7612 |
&gensym->name[1]), NULL, &sym); |
| 7613 |
sym->name = gfc_get_string (gensym->name); |
7613 |
sym->name = gfc_get_string ("%s", gensym->name); |
| 7614 |
head = gensym->generic; |
7614 |
head = gensym->generic; |
| 7615 |
intr = gfc_get_interface (); |
7615 |
intr = gfc_get_interface (); |
| 7616 |
intr->sym = sym; |
7616 |
intr->sym = sym; |
|
Lines 8033-8039
match_binding_attributes (gfc_typebound_
Link Here
|
| 8033 |
if (m == MATCH_ERROR) |
8033 |
if (m == MATCH_ERROR) |
| 8034 |
goto error; |
8034 |
goto error; |
| 8035 |
if (m == MATCH_YES) |
8035 |
if (m == MATCH_YES) |
| 8036 |
ba->pass_arg = gfc_get_string (arg); |
8036 |
ba->pass_arg = gfc_get_string ("%s", arg); |
| 8037 |
gcc_assert ((m == MATCH_YES) == (ba->pass_arg != NULL)); |
8037 |
gcc_assert ((m == MATCH_YES) == (ba->pass_arg != NULL)); |
| 8038 |
|
8038 |
|
| 8039 |
found_passing = true; |
8039 |
found_passing = true; |
| 8040 |
-- gcc-4.9.4/gcc/fortran/frontend-passes.c |
8040 |
++ gcc-4.9.4-format-security/gcc/fortran/frontend-passes.c |
|
Lines 1648-1654
optimize_minmaxloc (gfc_expr **e)
Link Here
|
| 1648 |
strcpy (name, fn->value.function.name); |
1648 |
strcpy (name, fn->value.function.name); |
| 1649 |
p = strstr (name, "loc0"); |
1649 |
p = strstr (name, "loc0"); |
| 1650 |
p[3] = '1'; |
1650 |
p[3] = '1'; |
| 1651 |
fn->value.function.name = gfc_get_string (name); |
1651 |
fn->value.function.name = gfc_get_string ("%s", name); |
| 1652 |
if (fn->value.function.actual->next) |
1652 |
if (fn->value.function.actual->next) |
| 1653 |
{ |
1653 |
{ |
| 1654 |
a = fn->value.function.actual->next; |
1654 |
a = fn->value.function.actual->next; |
| 1655 |
-- gcc-4.9.4/gcc/fortran/intrinsic.c |
1655 |
++ gcc-4.9.4-format-security/gcc/fortran/intrinsic.c |
|
Lines 332-342
add_sym (const char *name, gfc_isym_id i
Link Here
|
| 332 |
break; |
332 |
break; |
| 333 |
|
333 |
|
| 334 |
case SZ_NOTHING: |
334 |
case SZ_NOTHING: |
| 335 |
next_sym->name = gfc_get_string (name); |
335 |
next_sym->name = gfc_get_string ("%s", name); |
| 336 |
|
336 |
|
| 337 |
strcpy (buf, "_gfortran_"); |
337 |
strcpy (buf, "_gfortran_"); |
| 338 |
strcat (buf, name); |
338 |
strcat (buf, name); |
| 339 |
next_sym->lib_name = gfc_get_string (buf); |
339 |
next_sym->lib_name = gfc_get_string ("%s", buf); |
| 340 |
|
340 |
|
| 341 |
next_sym->pure = (cl != CLASS_IMPURE); |
341 |
next_sym->pure = (cl != CLASS_IMPURE); |
| 342 |
next_sym->elemental = (cl == CLASS_ELEMENTAL); |
342 |
next_sym->elemental = (cl == CLASS_ELEMENTAL); |
|
Lines 860-866
find_sym (gfc_intrinsic_sym *start, int
Link Here
|
| 860 |
/* name may be a user-supplied string, so we must first make sure |
860 |
/* name may be a user-supplied string, so we must first make sure |
| 861 |
that we're comparing against a pointer into the global string |
861 |
that we're comparing against a pointer into the global string |
| 862 |
table. */ |
862 |
table. */ |
| 863 |
const char *p = gfc_get_string (name); |
863 |
const char *p = gfc_get_string ("%s", name); |
| 864 |
|
864 |
|
| 865 |
while (n > 0) |
865 |
while (n > 0) |
| 866 |
{ |
866 |
{ |
|
Lines 1130-1136
make_alias (const char *name, int standa
Link Here
|
| 1130 |
|
1130 |
|
| 1131 |
case SZ_NOTHING: |
1131 |
case SZ_NOTHING: |
| 1132 |
next_sym[0] = next_sym[-1]; |
1132 |
next_sym[0] = next_sym[-1]; |
| 1133 |
next_sym->name = gfc_get_string (name); |
1133 |
next_sym->name = gfc_get_string ("%s", name); |
| 1134 |
next_sym->standard = standard; |
1134 |
next_sym->standard = standard; |
| 1135 |
next_sym++; |
1135 |
next_sym++; |
| 1136 |
break; |
1136 |
break; |
| 1137 |
-- gcc-4.9.4/gcc/fortran/iresolve.c |
1137 |
++ gcc-4.9.4-format-security/gcc/fortran/iresolve.c |
|
Lines 141-147
resolve_bound (gfc_expr *f, gfc_expr *ar
Link Here
|
| 141 |
} |
141 |
} |
| 142 |
} |
142 |
} |
| 143 |
|
143 |
|
| 144 |
f->value.function.name = gfc_get_string (name); |
144 |
f->value.function.name = gfc_get_string ("%s", name); |
| 145 |
} |
145 |
} |
| 146 |
|
146 |
|
| 147 |
|
147 |
|
| 148 |
-- gcc-4.9.4/gcc/fortran/match.c |
148 |
++ gcc-4.9.4-format-security/gcc/fortran/match.c |
|
Lines 398-404
gfc_match_small_int (int *value)
Link Here
|
| 398 |
|
398 |
|
| 399 |
if (p != NULL) |
399 |
if (p != NULL) |
| 400 |
{ |
400 |
{ |
| 401 |
gfc_error (p); |
401 |
gfc_error ("%s", p); |
| 402 |
m = MATCH_ERROR; |
402 |
m = MATCH_ERROR; |
| 403 |
} |
403 |
} |
| 404 |
|
404 |
|
|
Lines 430-436
gfc_match_small_int_expr (int *value, gf
Link Here
|
| 430 |
|
430 |
|
| 431 |
if (p != NULL) |
431 |
if (p != NULL) |
| 432 |
{ |
432 |
{ |
| 433 |
gfc_error (p); |
433 |
gfc_error ("%s", p); |
| 434 |
m = MATCH_ERROR; |
434 |
m = MATCH_ERROR; |
| 435 |
} |
435 |
} |
| 436 |
|
436 |
|
| 437 |
-- gcc-4.9.4/gcc/fortran/matchexp.c |
437 |
++ gcc-4.9.4-format-security/gcc/fortran/matchexp.c |
|
Lines 186-192
match_primary (gfc_expr **result)
Link Here
|
| 186 |
return MATCH_YES; |
186 |
return MATCH_YES; |
| 187 |
|
187 |
|
| 188 |
syntax: |
188 |
syntax: |
| 189 |
gfc_error (expression_syntax); |
189 |
gfc_error ("%s", expression_syntax); |
| 190 |
return MATCH_ERROR; |
190 |
return MATCH_ERROR; |
| 191 |
} |
191 |
} |
| 192 |
|
192 |
|
|
Lines 470-476
match_level_2 (gfc_expr **result)
Link Here
|
| 470 |
m = match_ext_add_operand (&e); |
470 |
m = match_ext_add_operand (&e); |
| 471 |
if (m == MATCH_NO) |
471 |
if (m == MATCH_NO) |
| 472 |
{ |
472 |
{ |
| 473 |
gfc_error (expression_syntax); |
473 |
gfc_error ("%s", expression_syntax); |
| 474 |
m = MATCH_ERROR; |
474 |
m = MATCH_ERROR; |
| 475 |
} |
475 |
} |
| 476 |
} |
476 |
} |
|
Lines 509-515
match_level_2 (gfc_expr **result)
Link Here
|
| 509 |
|
509 |
|
| 510 |
m = match_ext_add_operand (&e); |
510 |
m = match_ext_add_operand (&e); |
| 511 |
if (m == MATCH_NO) |
511 |
if (m == MATCH_NO) |
| 512 |
gfc_error (expression_syntax); |
512 |
gfc_error ("%s", expression_syntax); |
| 513 |
if (m != MATCH_YES) |
513 |
if (m != MATCH_YES) |
| 514 |
{ |
514 |
{ |
| 515 |
gfc_free_expr (all); |
515 |
gfc_free_expr (all); |
|
Lines 559-565
match_level_3 (gfc_expr **result)
Link Here
|
| 559 |
|
559 |
|
| 560 |
m = match_level_2 (&e); |
560 |
m = match_level_2 (&e); |
| 561 |
if (m == MATCH_NO) |
561 |
if (m == MATCH_NO) |
| 562 |
gfc_error (expression_syntax); |
562 |
gfc_error ("%s", expression_syntax); |
| 563 |
if (m != MATCH_YES) |
563 |
if (m != MATCH_YES) |
| 564 |
{ |
564 |
{ |
| 565 |
gfc_free_expr (all); |
565 |
gfc_free_expr (all); |
|
Lines 620-626
match_level_4 (gfc_expr **result)
Link Here
|
| 620 |
|
620 |
|
| 621 |
m = match_level_3 (&right); |
621 |
m = match_level_3 (&right); |
| 622 |
if (m == MATCH_NO) |
622 |
if (m == MATCH_NO) |
| 623 |
gfc_error (expression_syntax); |
623 |
gfc_error ("%s", expression_syntax); |
| 624 |
if (m != MATCH_YES) |
624 |
if (m != MATCH_YES) |
| 625 |
{ |
625 |
{ |
| 626 |
gfc_free_expr (left); |
626 |
gfc_free_expr (left); |
|
Lines 729-735
match_or_operand (gfc_expr **result)
Link Here
|
| 729 |
|
729 |
|
| 730 |
m = match_and_operand (&e); |
730 |
m = match_and_operand (&e); |
| 731 |
if (m == MATCH_NO) |
731 |
if (m == MATCH_NO) |
| 732 |
gfc_error (expression_syntax); |
732 |
gfc_error ("%s", expression_syntax); |
| 733 |
if (m != MATCH_YES) |
733 |
if (m != MATCH_YES) |
| 734 |
{ |
734 |
{ |
| 735 |
gfc_free_expr (all); |
735 |
gfc_free_expr (all); |
|
Lines 772-778
match_equiv_operand (gfc_expr **result)
Link Here
|
| 772 |
|
772 |
|
| 773 |
m = match_or_operand (&e); |
773 |
m = match_or_operand (&e); |
| 774 |
if (m == MATCH_NO) |
774 |
if (m == MATCH_NO) |
| 775 |
gfc_error (expression_syntax); |
775 |
gfc_error ("%s", expression_syntax); |
| 776 |
if (m != MATCH_YES) |
776 |
if (m != MATCH_YES) |
| 777 |
{ |
777 |
{ |
| 778 |
gfc_free_expr (all); |
778 |
gfc_free_expr (all); |
|
Lines 826-832
match_level_5 (gfc_expr **result)
Link Here
|
| 826 |
|
826 |
|
| 827 |
m = match_equiv_operand (&e); |
827 |
m = match_equiv_operand (&e); |
| 828 |
if (m == MATCH_NO) |
828 |
if (m == MATCH_NO) |
| 829 |
gfc_error (expression_syntax); |
829 |
gfc_error ("%s", expression_syntax); |
| 830 |
if (m != MATCH_YES) |
830 |
if (m != MATCH_YES) |
| 831 |
{ |
831 |
{ |
| 832 |
gfc_free_expr (all); |
832 |
gfc_free_expr (all); |
|
Lines 885-891
gfc_match_expr (gfc_expr **result)
Link Here
|
| 885 |
|
885 |
|
| 886 |
m = match_level_5 (&e); |
886 |
m = match_level_5 (&e); |
| 887 |
if (m == MATCH_NO) |
887 |
if (m == MATCH_NO) |
| 888 |
gfc_error (expression_syntax); |
888 |
gfc_error ("%s", expression_syntax); |
| 889 |
if (m != MATCH_YES) |
889 |
if (m != MATCH_YES) |
| 890 |
{ |
890 |
{ |
| 891 |
gfc_free_expr (all); |
891 |
gfc_free_expr (all); |
| 892 |
-- gcc-4.9.4/gcc/fortran/module.c |
892 |
++ gcc-4.9.4-format-security/gcc/fortran/module.c |
|
Lines 418-424
dt_lower_string (const char *name)
Link Here
|
| 418 |
if (name[0] != (char) TOLOWER ((unsigned char) name[0])) |
418 |
if (name[0] != (char) TOLOWER ((unsigned char) name[0])) |
| 419 |
return gfc_get_string ("%c%s", (char) TOLOWER ((unsigned char) name[0]), |
419 |
return gfc_get_string ("%c%s", (char) TOLOWER ((unsigned char) name[0]), |
| 420 |
&name[1]); |
420 |
&name[1]); |
| 421 |
return gfc_get_string (name); |
421 |
return gfc_get_string ("%s", name); |
| 422 |
} |
422 |
} |
| 423 |
|
423 |
|
| 424 |
|
424 |
|
|
Lines 433-439
dt_upper_string (const char *name)
Link Here
|
| 433 |
if (name[0] != (char) TOUPPER ((unsigned char) name[0])) |
433 |
if (name[0] != (char) TOUPPER ((unsigned char) name[0])) |
| 434 |
return gfc_get_string ("%c%s", (char) TOUPPER ((unsigned char) name[0]), |
434 |
return gfc_get_string ("%c%s", (char) TOUPPER ((unsigned char) name[0]), |
| 435 |
&name[1]); |
435 |
&name[1]); |
| 436 |
return gfc_get_string (name); |
436 |
return gfc_get_string ("%s", name); |
| 437 |
} |
437 |
} |
| 438 |
|
438 |
|
| 439 |
/* Call here during module reading when we know what pointer to |
439 |
/* Call here during module reading when we know what pointer to |
|
Lines 584-590
gfc_match_use (void)
Link Here
|
| 584 |
return m; |
584 |
return m; |
| 585 |
} |
585 |
} |
| 586 |
|
586 |
|
| 587 |
use_list->module_name = gfc_get_string (name); |
587 |
use_list->module_name = gfc_get_string ("%s", name); |
| 588 |
|
588 |
|
| 589 |
if (gfc_match_eos () == MATCH_YES) |
589 |
if (gfc_match_eos () == MATCH_YES) |
| 590 |
goto done; |
590 |
goto done; |
|
Lines 855-863
find_true_name (const char *name, const
Link Here
|
| 855 |
gfc_symbol sym; |
855 |
gfc_symbol sym; |
| 856 |
int c; |
856 |
int c; |
| 857 |
|
857 |
|
| 858 |
t.name = gfc_get_string (name); |
858 |
t.name = gfc_get_string ("%s", name); |
| 859 |
if (module != NULL) |
859 |
if (module != NULL) |
| 860 |
sym.module = gfc_get_string (module); |
860 |
sym.module = gfc_get_string ("%s", module); |
| 861 |
else |
861 |
else |
| 862 |
sym.module = NULL; |
862 |
sym.module = NULL; |
| 863 |
t.sym = &sym; |
863 |
t.sym = &sym; |
|
Lines 1845-1851
mio_pool_string (const char **stringp)
Link Here
|
| 1845 |
else |
1845 |
else |
| 1846 |
{ |
1846 |
{ |
| 1847 |
require_atom (ATOM_STRING); |
1847 |
require_atom (ATOM_STRING); |
| 1848 |
*stringp = atom_string[0] == '\0' ? NULL : gfc_get_string (atom_string); |
1848 |
*stringp = atom_string[0] == '\0' ? NULL : gfc_get_string ("%s", atom_string); |
| 1849 |
free (atom_string); |
1849 |
free (atom_string); |
| 1850 |
} |
1850 |
} |
| 1851 |
} |
1851 |
} |
|
Lines 2796-2802
mio_symtree_ref (gfc_symtree **stp)
Link Here
|
| 2796 |
{ |
2796 |
{ |
| 2797 |
p->u.rsym.sym = gfc_new_symbol (p->u.rsym.true_name, |
2797 |
p->u.rsym.sym = gfc_new_symbol (p->u.rsym.true_name, |
| 2798 |
gfc_current_ns); |
2798 |
gfc_current_ns); |
| 2799 |
p->u.rsym.sym->module = gfc_get_string (p->u.rsym.module); |
2799 |
p->u.rsym.sym->module = gfc_get_string ("%s", p->u.rsym.module); |
| 2800 |
} |
2800 |
} |
| 2801 |
|
2801 |
|
| 2802 |
p->u.rsym.symtree->n.sym = p->u.rsym.sym; |
2802 |
p->u.rsym.symtree->n.sym = p->u.rsym.sym; |
|
Lines 4346-4352
load_generic_interfaces (void)
Link Here
|
| 4346 |
if (!sym) |
4346 |
if (!sym) |
| 4347 |
{ |
4347 |
{ |
| 4348 |
gfc_get_symbol (p, NULL, &sym); |
4348 |
gfc_get_symbol (p, NULL, &sym); |
| 4349 |
sym->name = gfc_get_string (name); |
4349 |
sym->name = gfc_get_string ("%s", name); |
| 4350 |
sym->module = module_name; |
4350 |
sym->module = module_name; |
| 4351 |
sym->attr.flavor = FL_PROCEDURE; |
4351 |
sym->attr.flavor = FL_PROCEDURE; |
| 4352 |
sym->attr.generic = 1; |
4352 |
sym->attr.generic = 1; |
|
Lines 4759-4765
load_needed (pointer_info *p)
Link Here
|
| 4759 |
|
4759 |
|
| 4760 |
sym = gfc_new_symbol (p->u.rsym.true_name, ns); |
4760 |
sym = gfc_new_symbol (p->u.rsym.true_name, ns); |
| 4761 |
sym->name = dt_lower_string (p->u.rsym.true_name); |
4761 |
sym->name = dt_lower_string (p->u.rsym.true_name); |
| 4762 |
sym->module = gfc_get_string (p->u.rsym.module); |
4762 |
sym->module = gfc_get_string ("%s", p->u.rsym.module); |
| 4763 |
if (p->u.rsym.binding_label) |
4763 |
if (p->u.rsym.binding_label) |
| 4764 |
sym->binding_label = IDENTIFIER_POINTER (get_identifier |
4764 |
sym->binding_label = IDENTIFIER_POINTER (get_identifier |
| 4765 |
(p->u.rsym.binding_label)); |
4765 |
(p->u.rsym.binding_label)); |
|
Lines 5120-5126
read_module (void)
Link Here
|
| 5120 |
gfc_current_ns); |
5120 |
gfc_current_ns); |
| 5121 |
info->u.rsym.sym->name = dt_lower_string (info->u.rsym.true_name); |
5121 |
info->u.rsym.sym->name = dt_lower_string (info->u.rsym.true_name); |
| 5122 |
sym = info->u.rsym.sym; |
5122 |
sym = info->u.rsym.sym; |
| 5123 |
sym->module = gfc_get_string (info->u.rsym.module); |
5123 |
sym->module = gfc_get_string ("%s", info->u.rsym.module); |
| 5124 |
|
5124 |
|
| 5125 |
if (info->u.rsym.binding_label) |
5125 |
if (info->u.rsym.binding_label) |
| 5126 |
sym->binding_label = |
5126 |
sym->binding_label = |
|
Lines 5475-5481
write_dt_extensions (gfc_symtree *st)
Link Here
|
| 5475 |
strcpy (name, module_name); |
5475 |
strcpy (name, module_name); |
| 5476 |
mio_internal_string (name); |
5476 |
mio_internal_string (name); |
| 5477 |
if (iomode == IO_INPUT) |
5477 |
if (iomode == IO_INPUT) |
| 5478 |
module_name = gfc_get_string (name); |
5478 |
module_name = gfc_get_string ("%s", name); |
| 5479 |
} |
5479 |
} |
| 5480 |
mio_rparen (); |
5480 |
mio_rparen (); |
| 5481 |
} |
5481 |
} |
|
Lines 6052-6058
gfc_dump_module (const char *name, int d
Link Here
|
| 6052 |
|
6052 |
|
| 6053 |
/* Write the module itself. */ |
6053 |
/* Write the module itself. */ |
| 6054 |
iomode = IO_OUTPUT; |
6054 |
iomode = IO_OUTPUT; |
| 6055 |
module_name = gfc_get_string (name); |
6055 |
module_name = gfc_get_string ("%s", name); |
| 6056 |
|
6056 |
|
| 6057 |
init_pi_tree (); |
6057 |
init_pi_tree (); |
| 6058 |
|
6058 |
|
|
Lines 6139-6145
create_intrinsic_function (const char *n
Link Here
|
| 6139 |
sym->attr.flavor = FL_PROCEDURE; |
6139 |
sym->attr.flavor = FL_PROCEDURE; |
| 6140 |
sym->attr.intrinsic = 1; |
6140 |
sym->attr.intrinsic = 1; |
| 6141 |
|
6141 |
|
| 6142 |
sym->module = gfc_get_string (modname); |
6142 |
sym->module = gfc_get_string ("%s", modname); |
| 6143 |
sym->attr.use_assoc = 1; |
6143 |
sym->attr.use_assoc = 1; |
| 6144 |
sym->from_intmod = module; |
6144 |
sym->from_intmod = module; |
| 6145 |
sym->intmod_sym_id = id; |
6145 |
sym->intmod_sym_id = id; |
|
Lines 6179-6185
import_iso_c_binding_module (void)
Link Here
|
| 6179 |
|
6179 |
|
| 6180 |
mod_sym->attr.flavor = FL_MODULE; |
6180 |
mod_sym->attr.flavor = FL_MODULE; |
| 6181 |
mod_sym->attr.intrinsic = 1; |
6181 |
mod_sym->attr.intrinsic = 1; |
| 6182 |
mod_sym->module = gfc_get_string (iso_c_module_name); |
6182 |
mod_sym->module = gfc_get_string ("%s", iso_c_module_name); |
| 6183 |
mod_sym->from_intmod = INTMOD_ISO_C_BINDING; |
6183 |
mod_sym->from_intmod = INTMOD_ISO_C_BINDING; |
| 6184 |
} |
6184 |
} |
| 6185 |
|
6185 |
|
|
Lines 6437-6443
create_int_parameter (const char *name,
Link Here
|
| 6437 |
gfc_get_sym_tree (name, gfc_current_ns, &tmp_symtree, false); |
6437 |
gfc_get_sym_tree (name, gfc_current_ns, &tmp_symtree, false); |
| 6438 |
sym = tmp_symtree->n.sym; |
6438 |
sym = tmp_symtree->n.sym; |
| 6439 |
|
6439 |
|
| 6440 |
sym->module = gfc_get_string (modname); |
6440 |
sym->module = gfc_get_string ("%s", modname); |
| 6441 |
sym->attr.flavor = FL_PARAMETER; |
6441 |
sym->attr.flavor = FL_PARAMETER; |
| 6442 |
sym->ts.type = BT_INTEGER; |
6442 |
sym->ts.type = BT_INTEGER; |
| 6443 |
sym->ts.kind = gfc_default_integer_kind; |
6443 |
sym->ts.kind = gfc_default_integer_kind; |
|
Lines 6470-6476
create_int_parameter_array (const char *
Link Here
|
| 6470 |
gfc_get_sym_tree (name, gfc_current_ns, &tmp_symtree, false); |
6470 |
gfc_get_sym_tree (name, gfc_current_ns, &tmp_symtree, false); |
| 6471 |
sym = tmp_symtree->n.sym; |
6471 |
sym = tmp_symtree->n.sym; |
| 6472 |
|
6472 |
|
| 6473 |
sym->module = gfc_get_string (modname); |
6473 |
sym->module = gfc_get_string ("%s", modname); |
| 6474 |
sym->attr.flavor = FL_PARAMETER; |
6474 |
sym->attr.flavor = FL_PARAMETER; |
| 6475 |
sym->ts.type = BT_INTEGER; |
6475 |
sym->ts.type = BT_INTEGER; |
| 6476 |
sym->ts.kind = gfc_default_integer_kind; |
6476 |
sym->ts.kind = gfc_default_integer_kind; |
|
Lines 6511-6517
create_derived_type (const char *name, c
Link Here
|
| 6511 |
|
6511 |
|
| 6512 |
gfc_get_sym_tree (name, gfc_current_ns, &tmp_symtree, false); |
6512 |
gfc_get_sym_tree (name, gfc_current_ns, &tmp_symtree, false); |
| 6513 |
sym = tmp_symtree->n.sym; |
6513 |
sym = tmp_symtree->n.sym; |
| 6514 |
sym->module = gfc_get_string (modname); |
6514 |
sym->module = gfc_get_string ("%s", modname); |
| 6515 |
sym->from_intmod = module; |
6515 |
sym->from_intmod = module; |
| 6516 |
sym->intmod_sym_id = id; |
6516 |
sym->intmod_sym_id = id; |
| 6517 |
sym->attr.flavor = FL_PROCEDURE; |
6517 |
sym->attr.flavor = FL_PROCEDURE; |
|
Lines 6521-6532
create_derived_type (const char *name, c
Link Here
|
| 6521 |
gfc_get_sym_tree (dt_upper_string (sym->name), |
6521 |
gfc_get_sym_tree (dt_upper_string (sym->name), |
| 6522 |
gfc_current_ns, &tmp_symtree, false); |
6522 |
gfc_current_ns, &tmp_symtree, false); |
| 6523 |
dt_sym = tmp_symtree->n.sym; |
6523 |
dt_sym = tmp_symtree->n.sym; |
| 6524 |
dt_sym->name = gfc_get_string (sym->name); |
6524 |
dt_sym->name = gfc_get_string ("%s", sym->name); |
| 6525 |
dt_sym->attr.flavor = FL_DERIVED; |
6525 |
dt_sym->attr.flavor = FL_DERIVED; |
| 6526 |
dt_sym->attr.private_comp = 1; |
6526 |
dt_sym->attr.private_comp = 1; |
| 6527 |
dt_sym->attr.zero_comp = 1; |
6527 |
dt_sym->attr.zero_comp = 1; |
| 6528 |
dt_sym->attr.use_assoc = 1; |
6528 |
dt_sym->attr.use_assoc = 1; |
| 6529 |
dt_sym->module = gfc_get_string (modname); |
6529 |
dt_sym->module = gfc_get_string ("%s", modname); |
| 6530 |
dt_sym->from_intmod = module; |
6530 |
dt_sym->from_intmod = module; |
| 6531 |
dt_sym->intmod_sym_id = id; |
6531 |
dt_sym->intmod_sym_id = id; |
| 6532 |
|
6532 |
|
|
Lines 6606-6612
use_iso_fortran_env_module (void)
Link Here
|
| 6606 |
|
6606 |
|
| 6607 |
mod_sym->attr.flavor = FL_MODULE; |
6607 |
mod_sym->attr.flavor = FL_MODULE; |
| 6608 |
mod_sym->attr.intrinsic = 1; |
6608 |
mod_sym->attr.intrinsic = 1; |
| 6609 |
mod_sym->module = gfc_get_string (mod); |
6609 |
mod_sym->module = gfc_get_string ("%s", mod); |
| 6610 |
mod_sym->from_intmod = INTMOD_ISO_FORTRAN_ENV; |
6610 |
mod_sym->from_intmod = INTMOD_ISO_FORTRAN_ENV; |
| 6611 |
} |
6611 |
} |
| 6612 |
else |
6612 |
else |
| 6613 |
-- gcc-4.9.4/gcc/fortran/openmp.c |
6613 |
++ gcc-4.9.4-format-security/gcc/fortran/openmp.c |
|
Lines 575-581
gfc_match_omp_clauses (gfc_omp_clauses *
Link Here
|
| 575 |
const char *p = gfc_extract_int (cexpr, &collapse); |
575 |
const char *p = gfc_extract_int (cexpr, &collapse); |
| 576 |
if (p) |
576 |
if (p) |
| 577 |
{ |
577 |
{ |
| 578 |
gfc_error_now (p); |
578 |
gfc_error_now ("%s", p); |
| 579 |
collapse = 1; |
579 |
collapse = 1; |
| 580 |
} |
580 |
} |
| 581 |
else if (collapse <= 0) |
581 |
else if (collapse <= 0) |
| 582 |
-- gcc-4.9.4/gcc/fortran/primary.c |
582 |
++ gcc-4.9.4-format-security/gcc/fortran/primary.c |
|
Lines 273-279
match_hollerith_constant (gfc_expr **res
Link Here
|
| 273 |
msg = gfc_extract_int (e, &num); |
273 |
msg = gfc_extract_int (e, &num); |
| 274 |
if (msg != NULL) |
274 |
if (msg != NULL) |
| 275 |
{ |
275 |
{ |
| 276 |
gfc_error (msg); |
276 |
gfc_error ("%s", msg); |
| 277 |
goto cleanup; |
277 |
goto cleanup; |
| 278 |
} |
278 |
} |
| 279 |
if (num == 0) |
279 |
if (num == 0) |
|
Lines 1023-1029
match_string_constant (gfc_expr **result
Link Here
|
| 1023 |
q = gfc_extract_int (sym->value, &kind); |
1023 |
q = gfc_extract_int (sym->value, &kind); |
| 1024 |
if (q != NULL) |
1024 |
if (q != NULL) |
| 1025 |
{ |
1025 |
{ |
| 1026 |
gfc_error (q); |
1026 |
gfc_error ("%s", q); |
| 1027 |
return MATCH_ERROR; |
1027 |
return MATCH_ERROR; |
| 1028 |
} |
1028 |
} |
| 1029 |
gfc_set_sym_referenced (sym); |
1029 |
gfc_set_sym_referenced (sym); |
|
Lines 1584-1590
match_keyword_arg (gfc_actual_arglist *a
Link Here
|
| 1584 |
} |
1584 |
} |
| 1585 |
} |
1585 |
} |
| 1586 |
|
1586 |
|
| 1587 |
actual->name = gfc_get_string (name); |
1587 |
actual->name = gfc_get_string ("%s", name); |
| 1588 |
return MATCH_YES; |
1588 |
return MATCH_YES; |
| 1589 |
|
1589 |
|
| 1590 |
cleanup: |
1590 |
cleanup: |
| 1591 |
-- gcc-4.9.4/gcc/fortran/symbol.c |
1591 |
++ gcc-4.9.4-format-security/gcc/fortran/symbol.c |
|
Lines 1911-1917
gfc_add_component (gfc_symbol *sym, cons
Link Here
|
| 1911 |
else |
1911 |
else |
| 1912 |
tail->next = p; |
1912 |
tail->next = p; |
| 1913 |
|
1913 |
|
| 1914 |
p->name = gfc_get_string (name); |
1914 |
p->name = gfc_get_string ("%s", name); |
| 1915 |
p->loc = gfc_current_locus; |
1915 |
p->loc = gfc_current_locus; |
| 1916 |
p->ts.type = BT_UNKNOWN; |
1916 |
p->ts.type = BT_UNKNOWN; |
| 1917 |
|
1917 |
|
|
Lines 2410-2416
gfc_new_symtree (gfc_symtree **root, con
Link Here
|
| 2410 |
gfc_symtree *st; |
2410 |
gfc_symtree *st; |
| 2411 |
|
2411 |
|
| 2412 |
st = XCNEW (gfc_symtree); |
2412 |
st = XCNEW (gfc_symtree); |
| 2413 |
st->name = gfc_get_string (name); |
2413 |
st->name = gfc_get_string ("%s", name); |
| 2414 |
|
2414 |
|
| 2415 |
gfc_insert_bbt (root, st, compare_symtree); |
2415 |
gfc_insert_bbt (root, st, compare_symtree); |
| 2416 |
return st; |
2416 |
return st; |
|
Lines 2426-2432
gfc_delete_symtree (gfc_symtree **root,
Link Here
|
| 2426 |
|
2426 |
|
| 2427 |
st0 = gfc_find_symtree (*root, name); |
2427 |
st0 = gfc_find_symtree (*root, name); |
| 2428 |
|
2428 |
|
| 2429 |
st.name = gfc_get_string (name); |
2429 |
st.name = gfc_get_string ("%s", name); |
| 2430 |
gfc_delete_bbt (root, &st, compare_symtree); |
2430 |
gfc_delete_bbt (root, &st, compare_symtree); |
| 2431 |
|
2431 |
|
| 2432 |
free (st0); |
2432 |
free (st0); |
|
Lines 2488-2494
gfc_get_uop (const char *name)
Link Here
|
| 2488 |
st = gfc_new_symtree (&ns->uop_root, name); |
2488 |
st = gfc_new_symtree (&ns->uop_root, name); |
| 2489 |
|
2489 |
|
| 2490 |
uop = st->n.uop = XCNEW (gfc_user_op); |
2490 |
uop = st->n.uop = XCNEW (gfc_user_op); |
| 2491 |
uop->name = gfc_get_string (name); |
2491 |
uop->name = gfc_get_string ("%s", name); |
| 2492 |
uop->access = ACCESS_UNKNOWN; |
2492 |
uop->access = ACCESS_UNKNOWN; |
| 2493 |
uop->ns = ns; |
2493 |
uop->ns = ns; |
| 2494 |
|
2494 |
|
|
Lines 2595-2601
gfc_new_symbol (const char *name, gfc_na
Link Here
|
| 2595 |
if (strlen (name) > GFC_MAX_SYMBOL_LEN) |
2595 |
if (strlen (name) > GFC_MAX_SYMBOL_LEN) |
| 2596 |
gfc_internal_error ("new_symbol(): Symbol name too long"); |
2596 |
gfc_internal_error ("new_symbol(): Symbol name too long"); |
| 2597 |
|
2597 |
|
| 2598 |
p->name = gfc_get_string (name); |
2598 |
p->name = gfc_get_string ("%s", name); |
| 2599 |
|
2599 |
|
| 2600 |
/* Make sure flags for symbol being C bound are clear initially. */ |
2600 |
/* Make sure flags for symbol being C bound are clear initially. */ |
| 2601 |
p->attr.is_bind_c = 0; |
2601 |
p->attr.is_bind_c = 0; |
|
Lines 3786-3792
gfc_get_gsymbol (const char *name)
Link Here
|
| 3786 |
|
3786 |
|
| 3787 |
s = XCNEW (gfc_gsymbol); |
3787 |
s = XCNEW (gfc_gsymbol); |
| 3788 |
s->type = GSYM_UNKNOWN; |
3788 |
s->type = GSYM_UNKNOWN; |
| 3789 |
s->name = gfc_get_string (name); |
3789 |
s->name = gfc_get_string ("%s", name); |
| 3790 |
|
3790 |
|
| 3791 |
gfc_insert_bbt (&gfc_gsym_root, s, gsym_compare); |
3791 |
gfc_insert_bbt (&gfc_gsym_root, s, gsym_compare); |
| 3792 |
|
3792 |
|
|
Lines 4232-4238
generate_isocbinding_symbol (const char
Link Here
|
| 4232 |
} |
4232 |
} |
| 4233 |
|
4233 |
|
| 4234 |
/* Say what module this symbol belongs to. */ |
4234 |
/* Say what module this symbol belongs to. */ |
| 4235 |
tmp_sym->module = gfc_get_string (mod_name); |
4235 |
tmp_sym->module = gfc_get_string ("%s", mod_name); |
| 4236 |
tmp_sym->from_intmod = INTMOD_ISO_C_BINDING; |
4236 |
tmp_sym->from_intmod = INTMOD_ISO_C_BINDING; |
| 4237 |
tmp_sym->intmod_sym_id = s; |
4237 |
tmp_sym->intmod_sym_id = s; |
| 4238 |
tmp_sym->attr.is_iso_c = 1; |
4238 |
tmp_sym->attr.is_iso_c = 1; |
|
Lines 4352-4358
generate_isocbinding_symbol (const char
Link Here
|
| 4352 |
} |
4352 |
} |
| 4353 |
|
4353 |
|
| 4354 |
/* Say what module this symbol belongs to. */ |
4354 |
/* Say what module this symbol belongs to. */ |
| 4355 |
dt_sym->module = gfc_get_string (mod_name); |
4355 |
dt_sym->module = gfc_get_string ("%s", mod_name); |
| 4356 |
dt_sym->from_intmod = INTMOD_ISO_C_BINDING; |
4356 |
dt_sym->from_intmod = INTMOD_ISO_C_BINDING; |
| 4357 |
dt_sym->intmod_sym_id = s; |
4357 |
dt_sym->intmod_sym_id = s; |
| 4358 |
dt_sym->attr.use_assoc = 1; |
4358 |
dt_sym->attr.use_assoc = 1; |
| 4359 |
-- gcc-4.9.4/gcc/fortran/trans-decl.c |
4359 |
++ gcc-4.9.4-format-security/gcc/fortran/trans-decl.c |
|
Lines 4164-4170
gfc_find_module (const char *name)
Link Here
|
| 4164 |
{ |
4164 |
{ |
| 4165 |
struct module_htab_entry *entry = ggc_alloc_cleared_module_htab_entry (); |
4165 |
struct module_htab_entry *entry = ggc_alloc_cleared_module_htab_entry (); |
| 4166 |
|
4166 |
|
| 4167 |
entry->name = gfc_get_string (name); |
4167 |
entry->name = gfc_get_string ("%s", name); |
| 4168 |
entry->decls = htab_create_ggc (10, module_htab_decls_hash, |
4168 |
entry->decls = htab_create_ggc (10, module_htab_decls_hash, |
| 4169 |
module_htab_decls_eq, NULL); |
4169 |
module_htab_decls_eq, NULL); |
| 4170 |
*slot = (void *) entry; |
4170 |
*slot = (void *) entry; |
| 4171 |
-- gcc-4.9.4/gcc/gcc.c |
4171 |
++ gcc-4.9.4-format-security/gcc/gcc.c |
|
Lines 2795-2801
execute (void)
Link Here
|
| 2795 |
if (errmsg != NULL) |
2795 |
if (errmsg != NULL) |
| 2796 |
{ |
2796 |
{ |
| 2797 |
if (err == 0) |
2797 |
if (err == 0) |
| 2798 |
fatal_error (errmsg); |
2798 |
fatal_error ("%s", errmsg); |
| 2799 |
else |
2799 |
else |
| 2800 |
{ |
2800 |
{ |
| 2801 |
errno = err; |
2801 |
errno = err; |
| 2802 |
-- gcc-4.9.4/gcc/lto-wrapper.c |
2802 |
++ gcc-4.9.4-format-security/gcc/lto-wrapper.c |
|
Lines 192-201
collect_execute (char **argv)
Link Here
|
| 192 |
if (err != 0) |
192 |
if (err != 0) |
| 193 |
{ |
193 |
{ |
| 194 |
errno = err; |
194 |
errno = err; |
| 195 |
fatal_perror (errmsg); |
195 |
fatal_perror ("%s", errmsg); |
| 196 |
} |
196 |
} |
| 197 |
else |
197 |
else |
| 198 |
fatal (errmsg); |
198 |
fatal ("%s", errmsg); |
| 199 |
} |
199 |
} |
| 200 |
|
200 |
|
| 201 |
return pex; |
201 |
return pex; |
| 202 |
-- gcc-4.9.4/gcc/opts.c |
202 |
++ gcc-4.9.4-format-security/gcc/opts.c |
|
Lines 1054-1060
print_filtered_help (unsigned int includ
Link Here
|
| 1054 |
{ |
1054 |
{ |
| 1055 |
if (* (const char **) flag_var != NULL) |
1055 |
if (* (const char **) flag_var != NULL) |
| 1056 |
snprintf (new_help + strlen (new_help), |
1056 |
snprintf (new_help + strlen (new_help), |
| 1057 |
sizeof (new_help) - strlen (new_help), |
1057 |
sizeof (new_help) - strlen (new_help),"%s", |
| 1058 |
* (const char **) flag_var); |
1058 |
* (const char **) flag_var); |
| 1059 |
} |
1059 |
} |
| 1060 |
else if (option->var_type == CLVC_ENUM) |
1060 |
else if (option->var_type == CLVC_ENUM) |
|
Lines 1068-1074
print_filtered_help (unsigned int includ
Link Here
|
| 1068 |
if (arg == NULL) |
1068 |
if (arg == NULL) |
| 1069 |
arg = _("[default]"); |
1069 |
arg = _("[default]"); |
| 1070 |
snprintf (new_help + strlen (new_help), |
1070 |
snprintf (new_help + strlen (new_help), |
| 1071 |
sizeof (new_help) - strlen (new_help), |
1071 |
sizeof (new_help) - strlen (new_help), "%s", |
| 1072 |
arg); |
1072 |
arg); |
| 1073 |
} |
1073 |
} |
| 1074 |
else |
1074 |
else |
| 1075 |
-- gcc-4.9.4/gcc/tree-sra.c |
1075 |
++ gcc-4.9.4-format-security/gcc/tree-sra.c |
|
Lines 3884-3890
dump_dereferences_table (FILE *f, const
Link Here
|
| 3884 |
{ |
3884 |
{ |
| 3885 |
basic_block bb; |
3885 |
basic_block bb; |
| 3886 |
|
3886 |
|
| 3887 |
fprintf (dump_file, str); |
3887 |
fprintf (dump_file, "%s", str); |
| 3888 |
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR_FOR_FN (cfun), |
3888 |
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR_FOR_FN (cfun), |
| 3889 |
EXIT_BLOCK_PTR_FOR_FN (cfun), next_bb) |
3889 |
EXIT_BLOCK_PTR_FOR_FN (cfun), next_bb) |
| 3890 |
{ |
3890 |
{ |
| 3891 |
-- gcc-4.9.4/gcc/tree-ssa-uninit.c |
3891 |
++ gcc-4.9.4-format-security/gcc/tree-ssa-uninit.c |
|
Lines 751-757
dump_predicates (gimple usestmt, pred_ch
Link Here
|
| 751 |
{ |
751 |
{ |
| 752 |
size_t i, j; |
752 |
size_t i, j; |
| 753 |
pred_chain one_pred_chain = vNULL; |
753 |
pred_chain one_pred_chain = vNULL; |
| 754 |
fprintf (dump_file, msg); |
754 |
fprintf (dump_file, "%s", msg); |
| 755 |
print_gimple_stmt (dump_file, usestmt, 0, 0); |
755 |
print_gimple_stmt (dump_file, usestmt, 0, 0); |
| 756 |
fprintf (dump_file, "is guarded by :\n\n"); |
756 |
fprintf (dump_file, "is guarded by :\n\n"); |
| 757 |
size_t num_preds = preds.length (); |
757 |
size_t num_preds = preds.length (); |
| 758 |
-- gcc-4.9.4/libcpp/expr.c |
758 |
++ gcc-4.9.4-format-security/libcpp/expr.c |
|
Lines 671-680
cpp_classify_number (cpp_reader *pfile,
Link Here
|
| 671 |
|
671 |
|
| 672 |
if (CPP_OPTION (pfile, c99)) |
672 |
if (CPP_OPTION (pfile, c99)) |
| 673 |
cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location, |
673 |
cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location, |
| 674 |
0, message); |
674 |
0, "%s", message); |
| 675 |
else |
675 |
else |
| 676 |
cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG, |
676 |
cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG, |
| 677 |
virtual_location, 0, message); |
677 |
virtual_location, 0, "%s", message); |
| 678 |
} |
678 |
} |
| 679 |
|
679 |
|
| 680 |
result |= CPP_N_INTEGER; |
680 |
result |= CPP_N_INTEGER; |
| 681 |
-- gcc-4.9.4/libcpp/macro.c |
681 |
++ gcc-4.9.4-format-security/libcpp/macro.c |
|
Lines 2966-2972
create_iso_definition (cpp_reader *pfile
Link Here
|
| 2966 |
function-like macros, but not at the end. */ |
2966 |
function-like macros, but not at the end. */ |
| 2967 |
if (following_paste_op) |
2967 |
if (following_paste_op) |
| 2968 |
{ |
2968 |
{ |
| 2969 |
cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg); |
2969 |
cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg); |
| 2970 |
return false; |
2970 |
return false; |
| 2971 |
} |
2971 |
} |
| 2972 |
break; |
2972 |
break; |
|
Lines 2979-2985
create_iso_definition (cpp_reader *pfile
Link Here
|
| 2979 |
function-like macros, but not at the beginning. */ |
2979 |
function-like macros, but not at the beginning. */ |
| 2980 |
if (macro->count == 1) |
2980 |
if (macro->count == 1) |
| 2981 |
{ |
2981 |
{ |
| 2982 |
cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg); |
2982 |
cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg); |
| 2983 |
return false; |
2983 |
return false; |
| 2984 |
} |
2984 |
} |
| 2985 |
|
2985 |
|