OpenCoverage

strlcpy.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssh/src/openbsd-compat/strlcpy.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11size_t-
12strlcpy(char *dst, const char *src, size_t siz)-
13{-
14 char *d = dst;-
15 const char *s = src;-
16 size_t n = siz;-
17-
18-
19 if (n != 0
n != 0Description
TRUEevaluated 7692 times by 7 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_match
  • test_sshkey
  • test_utf8
FALSEnever evaluated
) {
0-7692
20 while (--
--n != 0Description
TRUEevaluated 444889 times by 7 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_match
  • test_sshkey
  • test_utf8
FALSEevaluated 7565 times by 5 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_utf8
n != 0
--n != 0Description
TRUEevaluated 444889 times by 7 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_match
  • test_sshkey
  • test_utf8
FALSEevaluated 7565 times by 5 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_utf8
) {
7565-444889
21 if ((*
(*d++ = *s++) == '\0'Description
TRUEevaluated 127 times by 5 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_match
  • test_sshkey
  • test_utf8
FALSEevaluated 444762 times by 7 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_match
  • test_sshkey
  • test_utf8
d++ = *s++) == '\0'
(*d++ = *s++) == '\0'Description
TRUEevaluated 127 times by 5 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_match
  • test_sshkey
  • test_utf8
FALSEevaluated 444762 times by 7 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_match
  • test_sshkey
  • test_utf8
)
127-444762
22 break;
executed 127 times by 5 tests: break;
Executed by:
  • ssh-keygen
  • sshd
  • test_match
  • test_sshkey
  • test_utf8
127
23 }
executed 444762 times by 7 tests: end of block
Executed by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_match
  • test_sshkey
  • test_utf8
444762
24 }
executed 7692 times by 7 tests: end of block
Executed by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_match
  • test_sshkey
  • test_utf8
7692
25-
26-
27 if (n == 0
n == 0Description
TRUEevaluated 7565 times by 5 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_utf8
FALSEevaluated 127 times by 5 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_match
  • test_sshkey
  • test_utf8
) {
127-7565
28 if (siz != 0
siz != 0Description
TRUEevaluated 7565 times by 5 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_utf8
FALSEnever evaluated
)
0-7565
29 *
executed 7565 times by 5 tests: *d = '\0';
Executed by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_utf8
d = '\0';
executed 7565 times by 5 tests: *d = '\0';
Executed by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_utf8
7565
30 while (*
*s++Description
TRUEnever evaluated
FALSEevaluated 7565 times by 5 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_utf8
s++
*s++Description
TRUEnever evaluated
FALSEevaluated 7565 times by 5 tests
Evaluated by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_utf8
)
0-7565
31 ;
never executed: ;
0
32 }
executed 7565 times by 5 tests: end of block
Executed by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_utf8
7565
33-
34 return
executed 7692 times by 7 tests: return(s - src - 1);
Executed by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_match
  • test_sshkey
  • test_utf8
(s - src - 1);
executed 7692 times by 7 tests: return(s - src - 1);
Executed by:
  • ssh-keygen
  • sshd
  • test_hostkeys
  • test_kex
  • test_match
  • test_sshkey
  • test_utf8
7692
35}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2