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 | 580bffbbddb4337d492d3524dd6c7560bb47b23b (patch) | |
tree | ffd65ed2c590318aacdbc228f81233cec1d69829 /src/editfns.c | |
parent | 33807db0f92dcbc2fc63ad66abf4080da289e236 (diff) | |
download | emacs-580bffbbddb4337d492d3524dd6c7560bb47b23b.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; |