[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#786744: jessie-pu: package libvncserver/0.9.9+dfsg-6.1



Package: release.debian.org
Severity: normal
Tags: patch
User: release.debian.org@packages.debian.org
Usertags: pu

Dear release team!

The current version of libvncserver in stable has an annoying bug [1], which is
already fixed upstream and in sid.

I think it would be very useful to have it also fixed in stable.

The fixing patch is attached.


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782570


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'stable-updates'), (500, 'stable'), (200,
'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.19.0-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
>From 4674d4632b9ffc6779d9c9f79b8ebb53c12e29b2 Mon Sep 17 00:00:00 2001
From: Floris Bos <bos@je-eigen-domein.nl>
Date: Fri, 2 Jan 2015 16:36:05 +0100
Subject: [PATCH] Initialize libgcrypt before use

https://www.gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html
"Before the library can be used, it must initialize itself.
This is achieved by invoking the function gcry_check_version"

Closes issue #45
Tested with krdc + libgcrypt 1.6.1 (libgcrypt20-dev Ubunutu package)
connecting to a Mac Mini.

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
 libvncclient/rfbproto.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c
index f653850..aa74c23 100644
--- a/libvncclient/rfbproto.c
+++ b/libvncclient/rfbproto.c
@@ -857,6 +857,16 @@ HandleARDAuth(rfbClient *client)
   rfbCredential *cred = NULL;
   rfbBool result = FALSE;
 
+  if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P))
+  {
+    /* Application did not initialize gcrypt, so we should */
+    if (!gcry_check_version(GCRYPT_VERSION))
+    {
+      /* Older version of libgcrypt is installed on system than compiled against */
+      rfbClientLog("libgcrypt version mismatch.\n");
+    }
+  }
+
   while (1)
   {
     if (!ReadFromRFBServer(client, (char *)gen, 2))
-- 
2.1.4


Reply to: