# HG changeset patch # User Jerry James # Date 1200697951 25200 # Node ID 80e07b006f9c32715be50f894640af03293ae544 # Parent 7080e020d70021a200ac537c0c58a6c210135934 Prevent access to uninitialized variables in x_init_device. 2008-01-18 Jerry James * device-x.c (x_init_device): Don't write to path or read from format when neither has been initialized. diff -r 7080e020d700 -r 80e07b006f9c src/ChangeLog --- a/src/ChangeLog Thu Jan 17 21:02:42 2008 -0500 +++ b/src/ChangeLog Fri Jan 18 16:12:31 2008 -0700 @@ -1,3 +1,8 @@ +2008-01-18 Jerry James + + * device-x.c (x_init_device): Don't write to path or read from + format when neither has been initialized. + 2008-01-16 Aidan Kehoe * elhash.c (internal_hash): diff -r 7080e020d700 -r 80e07b006f9c src/device-x.c --- a/src/device-x.c Thu Jan 17 21:02:42 2008 -0500 +++ b/src/device-x.c Fri Jan 18 16:12:31 2008 -0700 @@ -703,6 +703,10 @@ path = alloca_extbytes (strlen (data_dir) + 13 + strlen (locale) + 7); format = "%sapp-defaults/%s/Emacs"; } + else + { + goto no_data_directory; + } /* * The general form for $LANG is _.. Try @@ -730,6 +734,7 @@ XrmCombineFileDatabase (path, &db, False); } + no_data_directory: xfree (locale, Extbyte*); } #endif /* MULE */