OpenCoverage

freezero.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/compat/freezero.c
Source codeSwitch to Preprocessed file
LineSourceCount
1/*-
2 * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net>-
3 * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>-
4 * Copyright (c) 2008 Damien Miller <djm@openbsd.org>-
5 * Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org>-
6 *-
7 * Permission to use, copy, modify, and distribute this software for any-
8 * purpose with or without fee is hereby granted, provided that the above-
9 * copyright notice and this permission notice appear in all copies.-
10 *-
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES-
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF-
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR-
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES-
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN-
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF-
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.-
18 */-
19-
20#include <string.h>-
21#include <stdlib.h>-
22-
23void-
24freezero(void *ptr, size_t sz)-
25{-
26 /* This is legal. */-
27 if (ptr == NULL)
ptr == ((void *)0)Description
TRUEevaluated 18076 times by 18 tests
Evaluated by:
  • asn1test
  • base64test
  • bytestringtest
  • cipher_list
  • cipherstest
  • clienttest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssl_versions
  • ssltest
  • tls_ext_alpn
  • tls_prf
  • tlsexttest
  • tlstest
  • verifytest
FALSEevaluated 341477 times by 42 tests
Evaluated by:
  • aeadtest
  • asn1evp
  • asn1test
  • asn1time
  • base64test
  • bnaddsub
  • bntest
  • bytestringtest
  • cipher_list
  • cipherstest
  • clienttest
  • dhtest
  • dsatest
  • ecdhtest
  • ecdsatest
  • ectest
  • evptest
  • exptest
  • gost2814789t
  • hkdftest
  • hmactest
  • keypairtest
  • libcrypto.so.44.0.1
  • md4test
  • md5test
  • ...
18076-341477
28 return;
executed 18076 times by 18 tests: return;
Executed by:
  • asn1test
  • base64test
  • bytestringtest
  • cipher_list
  • cipherstest
  • clienttest
  • ecdsatest
  • keypairtest
  • libcrypto.so.44.0.1
  • pkcs7test
  • servertest
  • ssl_versions
  • ssltest
  • tls_ext_alpn
  • tls_prf
  • tlsexttest
  • tlstest
  • verifytest
18076
29-
30 explicit_bzero(ptr, sz);-
31 free(ptr);-
32}
executed 341477 times by 42 tests: end of block
Executed by:
  • aeadtest
  • asn1evp
  • asn1test
  • asn1time
  • base64test
  • bnaddsub
  • bntest
  • bytestringtest
  • cipher_list
  • cipherstest
  • clienttest
  • dhtest
  • dsatest
  • ecdhtest
  • ecdsatest
  • ectest
  • evptest
  • exptest
  • gost2814789t
  • hkdftest
  • hmactest
  • keypairtest
  • libcrypto.so.44.0.1
  • md4test
  • md5test
  • ...
341477
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.2