From: Paul Eggert Date: Thu, 22 Jun 2017 00:26:46 +0000 (-0700) Subject: Limit style_format to MAX_ALLOCA X-Git-Tag: emacs-26.0.90~521^2~19 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87a44b934ccecd2d9bdbf0afad576333741075b6;p=emacs.git Limit style_format to MAX_ALLOCA * src/editfns.c (styled_format): Subtract initial buffer size from sa_avail, since it is nontrivial. --- diff --git a/src/editfns.c b/src/editfns.c index f0c4593742d..da99c055b54 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -4179,6 +4179,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) bool maybe_combine_byte; bool arg_intervals = false; USE_SAFE_ALLOCA; + sa_avail -= sizeof initial_buffer; /* Information recorded for each format spec. */ struct info