diff options
-rw-r--r-- | localedata/ChangeLog | 7 | ||||
-rw-r--r-- | localedata/tst-fmon.c | 4 | ||||
-rw-r--r-- | localedata/tst-numeric.c | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 13d1e4709c..9815a9e81e 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,5 +1,12 @@ 2016-04-23 Mike Frysinger <vapier@gentoo.org> + [BZ #19671] + * tst-fmon.c (main): Change s from malloc to s[200]. Change 2nd + arg to strfmon from 200 to sizeof (s). + * tst-numeric.c (main): Likewise. + +2016-04-23 Mike Frysinger <vapier@gentoo.org> + * tst-langinfo.sh: Update YESEXPR & NOEXPR baselines to match current locales. diff --git a/localedata/tst-fmon.c b/localedata/tst-fmon.c index 995cf9056c..62cd7dbfd5 100644 --- a/localedata/tst-fmon.c +++ b/localedata/tst-fmon.c @@ -40,7 +40,7 @@ int main (int argc, char *argv[]) { - char *s = malloc (201); + char s[200]; if (setlocale (LC_MONETARY, argv[1]) == NULL) { @@ -48,7 +48,7 @@ main (int argc, char *argv[]) exit (EXIT_SETLOCALE); } - if (strfmon (s, 200, argv[2], (double) atof (argv[3])) == -1) + if (strfmon (s, sizeof (s), argv[2], (double) atof (argv[3])) == -1) { perror ("strfmon"); exit (EXIT_STRFMON); diff --git a/localedata/tst-numeric.c b/localedata/tst-numeric.c index 46a6b48150..64abb0a968 100644 --- a/localedata/tst-numeric.c +++ b/localedata/tst-numeric.c @@ -41,7 +41,7 @@ int main (int argc, char *argv[]) { - char *s = malloc (201); + char s[200]; double val; /* Make sure to read the value before setting of the locale, as @@ -54,7 +54,7 @@ main (int argc, char *argv[]) exit (EXIT_SETLOCALE); } - if (snprintf (s, 200, argv[2], val) == -1) + if (snprintf (s, sizeof (s), argv[2], val) == -1) { perror ("snprintf"); exit (EXIT_SNPRINTF); |