xorg-server: Changes to 'debian-unstable'
debian/changelog | 6 ++++
debian/patches/02_Add-libnettle-as-option-for-sha1.diff | 23 ++++++++++------
2 files changed, 21 insertions(+), 8 deletions(-)
New commits:
commit f6bcfe7db7d5daa8fe651c18883db19ac4b299cf
Author: Julien Cristau <jcristau@debian.org>
Date: Mon Nov 5 20:43:08 2012 +0100
Fix memory leak in libnettle sha1 patch.
Thanks, Yaakov Selkowitz!
diff --git a/debian/changelog b/debian/changelog
index 393c4de..5bf8070 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xorg-server (2:1.12.4-4) UNRELEASED; urgency=low
+
+ * Fix memory leak in libnettle sha1 patch. Thanks, Yaakov Selkowitz!
+
+ -- Julien Cristau <jcristau@debian.org> Mon, 05 Nov 2012 20:39:01 +0100
+
xorg-server (2:1.12.4-3) unstable; urgency=low
* Replace EXA patch from previous upload with the one actually applied
diff --git a/debian/patches/02_Add-libnettle-as-option-for-sha1.diff b/debian/patches/02_Add-libnettle-as-option-for-sha1.diff
index daf4fc2..eb7d318 100644
--- a/debian/patches/02_Add-libnettle-as-option-for-sha1.diff
+++ b/debian/patches/02_Add-libnettle-as-option-for-sha1.diff
@@ -8,8 +8,10 @@ Signed-off-by: Cyril Brulebois <kibi@debian.org>
[jcristau: forward-ported from 1.7 to 1.8]
Signed-off-by: Julien Cristau <jcristau@debian.org>
---
---- a/configure.ac
-+++ b/configure.ac
+Index: xorg-server/configure.ac
+===================================================================
+--- xorg-server.orig/configure.ac
++++ xorg-server/configure.ac
@@ -1339,7 +1339,7 @@ CORE_INCS='-I$(top_srcdir)/include -I$(t
# SHA1 hashing
@@ -36,8 +38,10 @@ Signed-off-by: Julien Cristau <jcristau@debian.org>
AC_MSG_CHECKING([for SHA1 implementation])
if test "x$with_sha1" = x; then
AC_MSG_ERROR([No suitable SHA1 implementation found])
---- a/include/dix-config.h.in
-+++ b/include/dix-config.h.in
+Index: xorg-server/include/dix-config.h.in
+===================================================================
+--- xorg-server.orig/include/dix-config.h.in
++++ xorg-server/include/dix-config.h.in
@@ -157,6 +157,9 @@
/* Define to use libsha1 for SHA1 */
#undef HAVE_SHA1_IN_LIBSHA1
@@ -48,9 +52,11 @@ Signed-off-by: Julien Cristau <jcristau@debian.org>
/* Define to 1 if you have the `shmctl64' function. */
#undef HAVE_SHMCTL64
---- a/os/xsha1.c
-+++ b/os/xsha1.c
-@@ -148,6 +148,31 @@ x_sha1_final(void *ctx, unsigned char re
+Index: xorg-server/os/xsha1.c
+===================================================================
+--- xorg-server.orig/os/xsha1.c
++++ xorg-server/os/xsha1.c
+@@ -148,6 +148,32 @@ x_sha1_final(void *ctx, unsigned char re
return 1;
}
@@ -60,7 +66,7 @@ Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+void *x_sha1_init(void)
+{
-+ struct sha1_ctx *ctx = xalloc(sizeof(*ctx));
++ struct sha1_ctx *ctx = malloc(sizeof(*ctx));
+ if (!ctx)
+ return NULL;
+ sha1_init(ctx);
@@ -76,6 +82,7 @@ Signed-off-by: Julien Cristau <jcristau@debian.org>
+int x_sha1_final(void *ctx, unsigned char result[20])
+{
+ sha1_digest(ctx, 20, result);
++ free(ctx);
+ return 1;
+}
+
Reply to: