File 0005-CVE-2012-4560-Fix-a-write-one-past-the-end-of-the-u-.patch of Package libssh.1120

From 5d15e5a268f74f661168c4ff4afe213327d6105e Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Fri, 5 Oct 2012 11:37:09 +0200
Subject: [PATCH 05/11] CVE-2012-4560: Fix a write one past the end of the 'u'
 buffer.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 1daa4057144aec1f52686ce4a5c347fd0d42599c)
---
 src/misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/misc.c b/src/misc.c
index 361fc2d..9dfe414 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -643,7 +643,7 @@ char *ssh_path_expand_tilde(const char *d) {
         size_t s = p - d;
         char u[128];
 
-        if (s > sizeof(u)) {
+        if (s >= sizeof(u)) {
             return NULL;
         }
         memcpy(u, d, s);
-- 
1.7.10.4

openSUSE Build Service is sponsored by