From 87a44b934ccecd2d9bdbf0afad576333741075b6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 21 Jun 2017 17:26:46 -0700 Subject: [PATCH] Limit style_format to MAX_ALLOCA * src/editfns.c (styled_format): Subtract initial buffer size from sa_avail, since it is nontrivial. --- src/editfns.c | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.2