1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 00:01:33 -08:00

Work around Bug#57211

* src/buffer.c (Fgenerate_new_buffer_name): Allocate a bigger buffer.
This commit is contained in:
Paul Eggert 2022-08-14 13:48:11 -07:00
parent 664c42df46
commit 23561f9665

View file

@ -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;