2000-11-19 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* rs6000/rs6000.c (rs6000_encode_section_info): Fix string length
calculation and allocation.
From-SVN: r37567
+2000-11-19 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * rs6000/rs6000.c (rs6000_encode_section_info): Fix string length
+ calculation and allocation.
+
2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* builtins.c (c_getstr): Constify variable.
{
rtx sym_ref = XEXP (DECL_RTL (decl), 0);
size_t len = strlen (XSTR (sym_ref, 0));
- char *str = alloca (len + 1);
+ char *str = alloca (len + 2);
str[0] = '@';
memcpy (str + 1, XSTR (sym_ref, 0), len + 1);
- XSTR (sym_ref, 0) = ggc_alloc_string (str, len);
+ XSTR (sym_ref, 0) = ggc_alloc_string (str, len + 1);
}
}
}