fox to ITS#5070 fix: error out if serialNumber requires size > sizeof(long long) (detected by Coverity)

This commit is contained in:
Pierangelo Masarati 2007-08-16 11:57:34 +00:00
parent 9c4d147747
commit 3771d2ed49

View 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