changeset: 4404:80e07b006f9c32715be50f894640af03293ae544
tag: tip
user: Jerry James <james(a)xemacs.org>
date: Fri Jan 18 16:12:31 2008 -0700
files: src/ChangeLog src/device-x.c
description:
Prevent access to uninitialized variables in x_init_device.
2008-01-18 Jerry James <james(a)xemacs.org>
* device-x.c (x_init_device): Don't write to path or read from
format when neither has been initialized.
diff -r 7080e020d70021a200ac537c0c58a6c210135934 -r
80e07b006f9c32715be50f894640af03293ae544 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-16 Aidan Kehoe <kehoea@parhasa
+2008-01-18 Jerry James <james(a)xemacs.org>
+
+ * 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 <kehoea(a)parhasard.net>
* elhash.c (internal_hash):
diff -r 7080e020d70021a200ac537c0c58a6c210135934 -r
80e07b006f9c32715be50f894640af03293ae544 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 @@ x_init_device (struct device *d, Lisp_Ob
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 <language>_<country>.<encoding>.
Try
@@ -730,6 +734,7 @@ x_init_device (struct device *d, Lisp_Ob
XrmCombineFileDatabase (path, &db, False);
}
+ no_data_directory:
xfree (locale, Extbyte*);
}
#endif /* MULE */
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches