aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/pam/pam-plugin-ccreds/0001-make-sure-we-don-t-overflow-the-data-buffer.patch
blob: d7f8f5a96694f30a96f5c713ab3ece17369ca875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 59a95494002ce57ace17d676544101e88a55265d Mon Sep 17 00:00:00 2001
From: Nicolas Boullis <nicolas.boullis@ecp.fr>
Date: Mon, 23 Mar 2009 10:46:44 +0100
Subject: [PATCH 1/3] make sure we don't overflow the data buffer

This patch was taken from Debian's libpam-ccreds v10-6 source:
	0001-make-sure-we-don-t-overflow-the-data-buffer.patch

Reviewed-by: Richard Leitner <richard.leitner@skidata.com>
---
 cc_db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc_db.c b/cc_db.c
index c0e0488..9371c4d 100644
--- a/cc_db.c
+++ b/cc_db.c
@@ -199,7 +199,7 @@ int pam_cc_db_get(void *_db, const char *keyname, size_t keylength,
 		return (rc == DB_NOTFOUND) ? PAM_AUTHINFO_UNAVAIL : PAM_SERVICE_ERR;
 	}
 
-	if (val.size < *size) {
+	if (val.size > *size) {
 		return PAM_BUF_ERR;
 	}
 
-- 
2.11.0