summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-08-14 13:48:11 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-08-14 13:49:33 -0700
commit23561f9665609bcb4cbe89a993a70eeccbec600e (patch)
tree46fb2ee57025ff07995e205743220e3dccdedfa2
parent664c42df463b355f946122e97549ed379618826e (diff)
downloademacs-23561f9665609bcb4cbe89a993a70eeccbec600e.tar.gz
Work around Bug#57211
* src/buffer.c (Fgenerate_new_buffer_name): Allocate a bigger buffer.
-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;