I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
47 lines
1 KiB
Diff
47 lines
1 KiB
Diff
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);
|