summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-03-20 15:15:34 +0100
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-03-25 14:10:18 +0100
commitb4ba2b7ce0933bede5d3b59a5abbde8fa3de2228 (patch)
treef8c32e0aace151b395f05005f68f836305228e59 /crypto/asn1
parentcbb9b7c460f5ecf7e4c32a9a8176f3078f1d8ec6 (diff)
Fix bug in strncpy() use of sk_ASN1_UTF8STRING2text() in asn1_lib.c
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/11300)
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/asn1_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c
index 765bbda5c7..fc4462eb8f 100644
--- a/crypto/asn1/asn1_lib.c
+++ b/crypto/asn1/asn1_lib.c
@@ -426,7 +426,7 @@ char *sk_ASN1_UTF8STRING2text(STACK_OF(ASN1_UTF8STRING) *text, const char *sep,
current = sk_ASN1_UTF8STRING_value(text, i);
length = ASN1_STRING_length(current);
if (i > 0 && sep_len > 0) {
- strncpy(p, sep, sep_len);
+ strncpy(p, sep, sep_len + 1);
p += sep_len;
}
strncpy(p, (const char *)ASN1_STRING_get0_data(current), length);
iable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/* XPM */
static char * tb_new_session_xpm[] = {
/* width height ncolors cpp [x_hot y_hot] */
"18 18 8 1 0 0",
/* colors */
" 	s none	m none	c none",
".	s bottomShadowColor	m black	c #5D6069",
"X	s iconColor2	m none	c #FFFFFF",
"o	s iconColor1	m black	c #000000",
"O	s iconGray2	m none	c #bdbdbd",
"+	s iconGray5	m black	c #737373",
"@	s iconGray4	m none	c #949494",
"#	s iconColor3	m black	c #FF0000",
/* pixels */
"    .  .X.  .     ",
"     . oXo .      ",
"    ..oXXXo..     ",
"    XXXXXXXXX     ",
"    ..oXXXo..     ",
"     . oXo .      ",
"    .  .X.  .     ",
"        .         ",
"   ooooooooooooo  ",
"  oXXXXXXXXXXOO+o ",
" oXXXXXXXXXXXX@+o ",
" oXOOOOOOOOO##@+o ",
" oXOOOOOOOOOOO@+o ",
" oXooooooooooO@+o.",
" oXXXXXXXXXXXO@+o.",
" oO@@@@@@@@@@@+o. ",
"  ooooooooooooo.  ",
"    ...........   "};