debian/changelog | 8 ++ debian/patches/01-revert-switch-to-xtasprintf.diff | 71 +++++++++++++++++++++ debian/patches/series | 2 3 files changed, 80 insertions(+), 1 deletion(-)
New commits: commit 85e89692821a9fa6d8130089c6eaae606d560a86 Author: Cyril Brulebois <[email protected]> Date: Mon Mar 7 21:03:13 2011 +0100 Add patch, reverting a commit causing xdm to fail when started from init (Closes: #617208). diff --git a/debian/changelog b/debian/changelog index 90ad2c0..f30fd6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +libxt (1:1.1.0-2) UNRELEASED; urgency=low + + * Add patch, reverting a commit causing xdm to fail when started from + init (Closes: #617208): + + 01-revert-switch-to-xtasprintf.diff + + -- Cyril Brulebois <[email protected]> Mon, 07 Mar 2011 20:58:47 +0100 + libxt (1:1.1.0-1) unstable; urgency=low [ Julien Cristau ] diff --git a/debian/patches/01-revert-switch-to-xtasprintf.diff b/debian/patches/01-revert-switch-to-xtasprintf.diff new file mode 100644 index 0000000..f26674c --- /dev/null +++ b/debian/patches/01-revert-switch-to-xtasprintf.diff @@ -0,0 +1,71 @@ +From b36d47b6b3538dc386fd82f8a204b47e3255dc99 Mon Sep 17 00:00:00 2001 +From: Cyril Brulebois <[email protected]> +Date: Mon, 7 Mar 2011 20:54:00 +0100 +Subject: [PATCH] Revert "Convert ALLOCATE_LOCAL + sprintf to XtAsprintf" + +This reverts commit 84e512a94295387bd0625ce619fc8bd381395c71. + +This causes xdm to fail when started from init, revert until a proper +fix is found. + +Debian bug #617208 (http://bugs.debian.org/617208). + +Signed-off-by: Cyril Brulebois <[email protected]> +--- + src/Initialize.c | 25 +++++++++++++++---------- + 1 files changed, 15 insertions(+), 10 deletions(-) + +diff --git a/src/Initialize.c b/src/Initialize.c +index e9543da..2e70e39 100644 +--- a/src/Initialize.c ++++ b/src/Initialize.c +@@ -380,7 +380,7 @@ static void CombineAppUserDefaults( + XrmDatabase *pdb) + { + char* filename; +- char* path = NULL; ++ char* path; + Boolean deallocate = False; + + if (!(path = getenv("XUSERFILESEARCHPATH"))) { +@@ -389,14 +389,20 @@ static void CombineAppUserDefaults( + char homedir[PATH_MAX]; + GetRootDirName(homedir, PATH_MAX); + if (!(old_path = getenv("XAPPLRESDIR"))) { +- XtAsprintf(&path, +- "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N", +- homedir, homedir, homedir, homedir, homedir, homedir); ++ char *path_default = "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N"; ++ if (!(path = ++ ALLOCATE_LOCAL(6*strlen(homedir) + strlen(path_default)))) ++ _XtAllocError(NULL); ++ sprintf( path, path_default, ++ homedir, homedir, homedir, homedir, homedir, homedir ); + } else { +- XtAsprintf(&path, +- "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N:%s/%%N", +- old_path, old_path, old_path, homedir, +- old_path, old_path, old_path, homedir); ++ char *path_default = "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N:%s/%%N"; ++ if (!(path = ++ ALLOCATE_LOCAL( 6*strlen(old_path) + 2*strlen(homedir) ++ + strlen(path_default)))) ++ _XtAllocError(NULL); ++ sprintf(path, path_default, old_path, old_path, old_path, homedir, ++ old_path, old_path, old_path, homedir ); + } + deallocate = True; + #endif +@@ -408,8 +414,7 @@ static void CombineAppUserDefaults( + XtFree(filename); + } + +- if (deallocate) +- XtFree(path); ++ if (deallocate) DEALLOCATE_LOCAL(path); + } + + static void CombineUserDefaults( +-- +1.7.4.1 + diff --git a/debian/patches/series b/debian/patches/series index 8b13789..be49393 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1 @@ - +01-revert-switch-to-xtasprintf.diff -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

