diff options
Diffstat (limited to 'security/nss/gtests/nss_bogo_shim')
-rw-r--r-- | security/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/security/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc b/security/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc index 12adcc5de0..854460508d 100644 --- a/security/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc +++ b/security/nss/gtests/nss_bogo_shim/nss_bogo_shim.cc @@ -657,8 +657,8 @@ class TestAgent { return SECFailure; } - SECITEM_AllocItem(NULL, output, input->len + 2); - if (output == NULL || output->data == NULL) { + if (output == NULL || output->data == NULL || + output->len != input->len + 2) { return SECFailure; } @@ -718,9 +718,8 @@ class TestAgent { return SECFailure; } - SECITEM_AllocItem(NULL, output, input->len - 4); - - if (output == NULL || output->data == NULL) { + if (output == NULL || output->data == NULL || + output->len != input->len - 4) { return SECFailure; } @@ -785,9 +784,9 @@ class TestAgent { std::cerr << "Certificate is too short. " << std::endl; return SECFailure; } - SECITEM_AllocItem(NULL, output, input->len - 1); - if (output == NULL || output->data == NULL) { + if (output == NULL || output->data == NULL || + output->len != input->len - 1) { return SECFailure; } |