Commit f3655f35 authored by Paul Eggert's avatar Paul Eggert

* frame.c (x_set_frame_parameters): Don't use uninitialized locals.

Without this change, the code can access the local variable 'width'
even when it has not been initialized, and likewise for 'height';
in either case this leads to undefined behavior.
parent def546a8
2014-07-31 Paul Eggert <eggert@cs.ucla.edu>
* frame.c (x_set_frame_parameters): Don't use uninitialized locals.
Without this change, the code can access the local variable 'width'
even when it has not been initialized, and likewise for 'height';
in either case this leads to undefined behavior.
2014-07-30 Dmitry Antipov <dmantipov@yandex.ru>
* xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly
......
......@@ -3198,10 +3198,9 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
XSETFRAME (frame, f);
if ((width_change || height_change)
&& (width != FRAME_TEXT_WIDTH (f)
|| height != FRAME_TEXT_HEIGHT (f)
|| f->new_height || f->new_width))
if (((width_change && width != FRAME_TEXT_WIDTH (f))
|| (height_change && height != FRAME_TEXT_HEIGHT (f)))
&& (f->new_height || f->new_width))
{
/* If necessary provide default values for HEIGHT and WIDTH. Do
that here since otherwise a size change implied by an
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment