diff options
author | Kim F. Storm <storm@cua.dk> | 2004-04-13 21:30:16 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2004-04-13 21:30:16 +0000 |
commit | d68de522ca10547a4d26e457c0e05639498051d1 (patch) | |
tree | fb244feb6a6183d382e6aa8ebe2b65aed265e6fd /src/editfns.c | |
parent | 5fc16e8e03459da78c3b268252daeeedf942876d (diff) | |
download | emacs-d68de522ca10547a4d26e457c0e05639498051d1.tar.gz |
(Fformat): Fix allocation size of precision array.
Diffstat (limited to 'src/editfns.c')
-rw-r--r-- | src/editfns.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/editfns.c b/src/editfns.c index ce075f2696c..a5c3aea14bc 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3220,7 +3220,7 @@ usage: (format STRING &rest OBJECTS) */) string itself, will not be used. Element NARGS, corresponding to no argument, *will* be assigned to in the case that a `%' and `.' occur after the final format specifier. */ - int *precision = (int *) (alloca(nargs * sizeof (int))); + int *precision = (int *) (alloca((nargs + 1) * sizeof (int))); int longest_format; Lisp_Object val; int arg_intervals = 0; @@ -3274,7 +3274,7 @@ usage: (format STRING &rest OBJECTS) */) /* Make room in result for all the non-%-codes in the control string. */ total = 5 + CONVERTED_BYTE_SIZE (multibyte, args[0]); - /* Allocate the info and discarded tables. */ + /* Allocate the info and discarded tables. */ { int nbytes = nargs * sizeof *info; int i; |