diff options
author | Martin Liska <marxin.liska@gmail.com> | 2013-08-21 14:27:10 +0000 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-08-21 14:27:10 +0000 |
commit | e0df53dd42f2ce39a6eebc879e535698eca88aff (patch) | |
tree | 854f1e33be25b57456abb59d3d1de94dbb40fbae /gcc/ipa.c | |
parent | e7d1d3ebe7bd4ab37bd243a65889bb7553bfc4e2 (diff) | |
download | gcc-e0df53dd42f2ce39a6eebc879e535698eca88aff.zip gcc-e0df53dd42f2ce39a6eebc879e535698eca88aff.tar.gz gcc-e0df53dd42f2ce39a6eebc879e535698eca88aff.tar.bz2 |
* ipa.c (ipa_profile_read_summary): Fix buffer overflow.
From-SVN: r201900
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1397,7 +1397,7 @@ ipa_profile_read_summary (void) static unsigned int ipa_profile (void) { - struct cgraph_node **order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes); + struct cgraph_node **order; struct cgraph_edge *e; int order_pos; bool something_changed = false; @@ -1575,6 +1575,7 @@ ipa_profile (void) nuseless, nuseless * 100.0 / nindirect, nconverted, nconverted * 100.0 / nindirect); + order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes); order_pos = ipa_reverse_postorder (order); for (i = order_pos - 1; i >= 0; i--) { |