--- snmplib/scapi.c 2008-06-06 15:44:30 +0000 +++ snmplib/scapi.c 2008-06-06 15:47:16 +0000 @@ -563,6 +563,10 @@ } + if (maclen != USM_MD5_AND_SHA_AUTH_LEN) { + QUITFUN(SNMPERR_GENERR, sc_check_keyed_hash_quit); + } + /* * Generate a full hash of the message, then compare * the result with the given MAC which may shorter than