Ticket #31786: heimdal-1.5.2.diff
File heimdal-1.5.2.diff, 3.0 KB (added by raimue (Rainer Müller), 12 years ago) |
---|
-
Portfile
4 4 PortSystem 1.0 5 5 6 6 name heimdal 7 version 1.3.3 8 revision 1 7 version 1.5.2 9 8 categories net security 10 9 license BSD MIT Permissive 11 10 maintainers landonf openmaintainer … … 24 23 25 24 homepage http://www.h5l.org/ 26 25 master_sites ${homepage}dist/src/ 27 checksums md5 963c09f1b14c41660be70b55fae9f163 \28 sha1 a385d959e3edd144aee79e9df585e44347342049 \29 rmd160 ce97ac415e7c27912ba148b81c46e756dc54ba3e30 26 27 checksums rmd160 1ab2f835309a916dfbba667d3d0d38a57c312fde \ 28 sha256 22603f282f31173533b939d289f3374258aa1ccccbe51ee088d7568d321279ec 29 31 30 depends_lib port:readline port:gettext 32 31 33 patchfiles patch-lib-sqlite-sqlite3.c.diff 32 patchfiles patch-kcm-segfault.diff 33 patch.pre_args -p1 34 34 35 35 # Use a separate prefix to avoid conflicts with the port kerberos5 36 36 # (and openssl, if that variant is selected) … … 84 84 configure.args-append --with-sqlite3=${prefix} 85 85 } 86 86 87 variant debug { 88 configure.cflags-append -g -O0 89 } 90 default_variants +debug 91 87 92 post-patch { 88 93 # Tiger does not have the CommonCrypto support needed for -openssl 89 94 if {${os.platform} == "darwin" && ${os.major} < 9} { … … 95 100 96 101 test.run yes 97 102 test.target check 103 test.env-append LC_CTYPE=C 98 104 99 105 livecheck.type regex 100 106 livecheck.url ${master_sites} -
files/patch-kcm-segfault.diff
1 From 2daeea4febe322ba134fff2c12c6ba54bd993d6f Mon Sep 17 00:00:00 2001 2 From: Love Hornquist Astrand <lha@h5l.org> 3 Date: Thu, 22 Sep 2011 16:36:52 +0200 4 Subject: [PATCH] handle error code from size_too_large more correct 5 6 --- 7 lib/krb5/store.c | 18 ++++++++++++------ 8 1 file changed, 12 insertions(+), 6 deletions(-) 9 10 diff --git a/lib/krb5/store.c b/lib/krb5/store.c 11 index 3aeb8d6..1f6622e 100644 12 --- a/lib/krb5/store.c 13 +++ b/lib/krb5/store.c 14 @@ -792,12 +792,15 @@ 15 ssize_t ret; 16 17 while((ret = sp->fetch(sp, &c, 1)) == 1){ 18 + krb5_error_code eret; 19 char *tmp; 20 21 len++; 22 - ret = size_too_large(sp, len); 23 - if (ret) 24 - break; 25 + eret = size_too_large(sp, len); 26 + if (eret) { 27 + free(s); 28 + return eret; 29 + } 30 tmp = realloc (s, len); 31 if (tmp == NULL) { 32 free (s); 33 @@ -852,6 +855,7 @@ 34 ssize_t ret; 35 36 while((ret = sp->fetch(sp, &c, 1)) == 1){ 37 + krb5_error_code eret; 38 char *tmp; 39 40 if (c == '\r') { 41 @@ -864,9 +868,11 @@ 42 } 43 44 len++; 45 - ret = size_too_large(sp, len); 46 - if (ret) 47 - break; 48 + eret = size_too_large(sp, len); 49 + if (eret) { 50 + free(s); 51 + return eret; 52 + } 53 tmp = realloc (s, len); 54 if (tmp == NULL) { 55 free (s); 56 -- 57 1.7.10 58