crypto: fix explanation in CipherBase::SetAuthTag

PR-URL: https://github.com/nodejs/node/pull/20197
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Tobias Nießen 2018-04-21 10:56:47 +02:00
parent 3ba81e34e8
commit 854f840243
No known key found for this signature in database
GPG Key ID: 718207F8FD156B70

View File

@ -2910,7 +2910,7 @@ void CipherBase::SetAuthTag(const FunctionCallbackInfo<Value>& args) {
}
}
// Note: we don't use std::max() here to work around a header conflict.
// Note: we don't use std::min() here to work around a header conflict.
cipher->auth_tag_len_ = tag_len;
if (cipher->auth_tag_len_ > sizeof(cipher->auth_tag_))
cipher->auth_tag_len_ = sizeof(cipher->auth_tag_);