]> git.sur5r.net Git - openldap/commitdiff
fox to ITS#5070 fix: error out if serialNumber requires size > sizeof(long long)...
authorPierangelo Masarati <ando@openldap.org>
Thu, 16 Aug 2007 11:57:34 +0000 (11:57 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 16 Aug 2007 11:57:34 +0000 (11:57 +0000)
servers/slapd/schema_init.c

index ec9547b3a78646b37896dfd6cc30885080c53f80..779b9420b502c2d489dacf03c8b8c384e76649f4 100644 (file)
@@ -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