From 3771d2ed49186ecbacb73df619550644d031baaa Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 16 Aug 2007 11:57:34 +0000 Subject: [PATCH] fox to ITS#5070 fix: error out if serialNumber requires size > sizeof(long long) (detected by Coverity) --- servers/slapd/schema_init.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.39.5