From: Pierangelo Masarati Date: Thu, 16 Aug 2007 11:57:34 +0000 (+0000) Subject: fox to ITS#5070 fix: error out if serialNumber requires size > sizeof(long long)... X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~203 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3771d2ed49186ecbacb73df619550644d031baaa;p=openldap fox to ITS#5070 fix: error out if serialNumber requires size > sizeof(long long) (detected by Coverity) --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index ec9547b3a7..779b9420b5 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -3414,8 +3414,17 @@ certificateExactNormalize( } seriallen = snprintf( serialbuf, sizeof(serialbuf), "%llu", sn ); + + } else { + /* do not accept serialNumber that requires + * more than long long */ + rc = LDAP_INVALID_SYNTAX; + goto done; } + #else + /* do not accept serialNumber that requires + * more than long */ rc = LDAP_INVALID_SYNTAX; goto done; #endif