summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 6ab516d5f51..98066a2eb60 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1160,7 +1160,8 @@ is first appended to NAME, to speed up finding a non-existent buffer. */)
genbase = name;
else
{
- char number[sizeof "-999999"];
+ enum { bug_52711 = true }; /* https://bugs.gnu.org/57211 */
+ char number[bug_52711 ? INT_BUFSIZE_BOUND (int) + 1 : sizeof "-999999"];
EMACS_INT r = get_random ();
eassume (0 <= r);
int i = r % 1000000;