From b7163a504a0b26e0068b6bc37a2b192e5e0cdac8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 29 Aug 2011 12:59:51 -0700 Subject: [PATCH] * xfns.c (x_window): Make sprintf buffer a bit bigger to avoid potential buffer overrun. --- src/ChangeLog | 3 +++ src/xfns.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index aeb984ee8df..53344aa7dd9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -94,6 +94,9 @@ * xfaces.c (x_update_menu_appearance): Don't overrun buffer if X resource line is longer than 512 bytes. + * xfns.c (x_window): Make sprintf buffer a bit bigger + to avoid potential buffer overrun. + 2011-08-26 Paul Eggert Integer and memory overflow issues (Bug#9196). diff --git a/src/xfns.c b/src/xfns.c index 9a3d5fcda83..194a8f063b7 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2440,7 +2440,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only) /* Do some needed geometry management. */ { ptrdiff_t len; - char *tem, shell_position[32]; + char *tem, shell_position[sizeof "=x++" + 4 * INT_STRLEN_BOUND (int)]; Arg gal[10]; int gac = 0; int extra_borders = 0; -- 2.39.2