From 93f5c5d1652d1617315985f1f1815d067cbd8257 Mon Sep 17 00:00:00 2001 From: Michael Nottebrock Date: Tue, 28 Nov 2006 12:39:38 +0000 Subject: [PATCH] Fix buffer overflow. Security: https://bugs.g10code.com/gnupg/issue728 --- security/gnupg-devel/Makefile | 1 + security/gnupg-devel/files/patch-g10-openfile.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 security/gnupg-devel/files/patch-g10-openfile.c diff --git a/security/gnupg-devel/Makefile b/security/gnupg-devel/Makefile index 26333ce88f5b..63b77aa4d49e 100644 --- a/security/gnupg-devel/Makefile +++ b/security/gnupg-devel/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnupg PORTVERSION= 1.9.22 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= ${MASTER_SITE_GNUPG} MASTER_SITE_SUBDIR= alpha/gnupg diff --git a/security/gnupg-devel/files/patch-g10-openfile.c b/security/gnupg-devel/files/patch-g10-openfile.c new file mode 100644 index 000000000000..d9d1f657da16 --- /dev/null +++ b/security/gnupg-devel/files/patch-g10-openfile.c @@ -0,0 +1,12 @@ +--- g10/openfile.c.orig Tue Nov 28 13:31:12 2006 ++++ g10/openfile.c Tue Nov 28 13:32:20 2006 +@@ -145,8 +145,8 @@ + + s = _("Enter new filename"); + +- n = strlen(s) + namelen + 10; + defname = name && namelen? make_printable_string( name, namelen, 0): NULL; ++ n = strlen(s) + (defname?strlen (defname):0) + 10; + prompt = xmalloc(n); + if( defname ) + sprintf(prompt, "%s [%s]: ", s, defname );