From: Anthony Hu Date: Wed, 10 Mar 2021 16:15:57 +0000 (-0500) Subject: Increase the upper limit on group name length X-Git-Tag: openssl-3.0.0-alpha14~337 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a8e6c1fb77612feba350a67dad3e548300785a7;p=thirdparty%2Fopenssl.git Increase the upper limit on group name length While all the standardized groups would fit within the old limit, with the addition of providers, some might want to experiment with new and unstandardized groups. As such, their names might not fit within the old limit. Define it as GROUP_NAME_BUFFER_LENGTH with value 64. Reviewed-by: Matt Caswell Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14502) --- diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 4d66db9f9d4..a389b0feeda 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -693,7 +693,7 @@ err: /* TODO(3.0): An arbitrary amount for now. Take another look at this */ # define MAX_GROUPLIST 40 - +# define GROUP_NAME_BUFFER_LENGTH 64 typedef struct { SSL_CTX *ctx; size_t gidcnt; @@ -705,7 +705,7 @@ static int gid_cb(const char *elem, int len, void *arg) gid_cb_st *garg = arg; size_t i; uint16_t gid = 0; - char etmp[20]; + char etmp[GROUP_NAME_BUFFER_LENGTH]; if (elem == NULL) return 0;