aboutsummaryrefslogtreecommitdiff
path: root/share/security/patches/SA-07:08/openssl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'share/security/patches/SA-07:08/openssl.patch')
-rw-r--r--share/security/patches/SA-07:08/openssl.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/share/security/patches/SA-07:08/openssl.patch b/share/security/patches/SA-07:08/openssl.patch
new file mode 100644
index 0000000000..e4d7f81879
--- /dev/null
+++ b/share/security/patches/SA-07:08/openssl.patch
@@ -0,0 +1,47 @@
+Index: crypto/openssl/ssl/ssl_lib.c
+===================================================================
+RCS file: /home/ncvs/src/crypto/openssl/ssl/ssl_lib.c,v
+retrieving revision 1.1.1.12.2.1
+diff -u -d -r1.1.1.12.2.1 ssl_lib.c
+--- crypto/openssl/ssl/ssl_lib.c 28 Sep 2006 13:02:36 -0000 1.1.1.12.2.1
++++ crypto/openssl/ssl/ssl_lib.c 3 Oct 2007 17:01:24 -0000
+@@ -1149,7 +1149,6 @@
+ char *SSL_get_shared_ciphers(SSL *s,char *buf,int len)
+ {
+ char *p;
+- const char *cp;
+ STACK_OF(SSL_CIPHER) *sk;
+ SSL_CIPHER *c;
+ int i;
+@@ -1162,20 +1161,21 @@
+ sk=s->session->ciphers;
+ for (i=0; i<sk_SSL_CIPHER_num(sk); i++)
+ {
+- /* Decrement for either the ':' or a '\0' */
+- len--;
++ int n;
++
+ c=sk_SSL_CIPHER_value(sk,i);
+- for (cp=c->name; *cp; )
++ n=strlen(c->name);
++ if (n+1 > len)
+ {
+- if (len-- <= 0)
+- {
+- *p='\0';
+- return(buf);
+- }
+- else
+- *(p++)= *(cp++);
++ if (p != buf)
++ --p;
++ *p='\0';
++ return buf;
+ }
++ strcpy(p,c->name);
++ p+=n;
+ *(p++)=':';
++ len-=n+1;
+ }
+ p[-1]='\0';
+ return(buf);