Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/compat/getentropy_linux.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | - | |||||||||||||
7 | - | |||||||||||||
8 | - | |||||||||||||
9 | - | |||||||||||||
10 | int getentropy(void *buf, size_t len); | - | ||||||||||||
11 | - | |||||||||||||
12 | static int gotdata(char *buf, size_t len); | - | ||||||||||||
13 | - | |||||||||||||
14 | static int getentropy_getrandom(void *buf, size_t len); | - | ||||||||||||
15 | - | |||||||||||||
16 | static int getentropy_urandom(void *buf, size_t len); | - | ||||||||||||
17 | - | |||||||||||||
18 | static int getentropy_sysctl(void *buf, size_t len); | - | ||||||||||||
19 | - | |||||||||||||
20 | static int getentropy_fallback(void *buf, size_t len); | - | ||||||||||||
21 | static int getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data); | - | ||||||||||||
22 | - | |||||||||||||
23 | int | - | ||||||||||||
24 | getentropy(void *buf, size_t len) | - | ||||||||||||
25 | { | - | ||||||||||||
26 | int ret = -1; | - | ||||||||||||
27 | - | |||||||||||||
28 | if (len > 256
| 0-182 | ||||||||||||
29 | - | |||||||||||||
30 | (*__errno_location ()) | - | ||||||||||||
31 | = | - | ||||||||||||
32 | 5 | - | ||||||||||||
33 | ; | - | ||||||||||||
34 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||||||||
35 | } | - | ||||||||||||
36 | ret = getentropy_getrandom(buf, len); | - | ||||||||||||
37 | if (ret != -1
| 0-182 | ||||||||||||
38 | return executed 182 times by 27 tests: (ret);return (ret); Executed by:
executed 182 times by 27 tests: return (ret); Executed by:
| 182 | ||||||||||||
39 | ret = getentropy_urandom(buf, len); | - | ||||||||||||
40 | if (ret != -1
| 0 | ||||||||||||
41 | return never executed: (ret);return (ret); never executed: return (ret); | 0 | ||||||||||||
42 | ret = getentropy_sysctl(buf, len); | - | ||||||||||||
43 | if (ret != -1
| 0 | ||||||||||||
44 | return never executed: (ret);return (ret); never executed: return (ret); | 0 | ||||||||||||
45 | ret = getentropy_fallback(buf, len); | - | ||||||||||||
46 | if (ret != -1
| 0 | ||||||||||||
47 | return never executed: (ret);return (ret); never executed: return (ret); | 0 | ||||||||||||
48 | - | |||||||||||||
49 | - | |||||||||||||
50 | (*__errno_location ()) | - | ||||||||||||
51 | = | - | ||||||||||||
52 | 5 | - | ||||||||||||
53 | ; | - | ||||||||||||
54 | return never executed: (ret);return (ret); never executed: return (ret); | 0 | ||||||||||||
55 | } | - | ||||||||||||
56 | - | |||||||||||||
57 | - | |||||||||||||
58 | - | |||||||||||||
59 | - | |||||||||||||
60 | static int | - | ||||||||||||
61 | gotdata(char *buf, size_t len) | - | ||||||||||||
62 | { | - | ||||||||||||
63 | char any_set = 0; | - | ||||||||||||
64 | size_t i; | - | ||||||||||||
65 | - | |||||||||||||
66 | for (i = 0; i < len
| 0 | ||||||||||||
67 | any_set |= buf[i]; never executed: any_set |= buf[i]; | 0 | ||||||||||||
68 | if (any_set == 0
| 0 | ||||||||||||
69 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||||||||
70 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||
71 | } | - | ||||||||||||
72 | - | |||||||||||||
73 | - | |||||||||||||
74 | static int | - | ||||||||||||
75 | getentropy_getrandom(void *buf, size_t len) | - | ||||||||||||
76 | { | - | ||||||||||||
77 | int pre_errno = | - | ||||||||||||
78 | (*__errno_location ()) | - | ||||||||||||
79 | ; | - | ||||||||||||
80 | int ret; | - | ||||||||||||
81 | if (len > 256
| 0-182 | ||||||||||||
82 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||||||||
83 | do { | - | ||||||||||||
84 | ret = syscall( | - | ||||||||||||
85 | 318 | - | ||||||||||||
86 | , buf, len, | - | ||||||||||||
87 | 0x0001 | - | ||||||||||||
88 | ); | - | ||||||||||||
89 | } executed 182 times by 27 tests: while (ret == -1end of block Executed by:
| 0-182 | ||||||||||||
90 | (*
| 0 | ||||||||||||
91 | ==
| 0 | ||||||||||||
92 | 4
| 0 | ||||||||||||
93 | ); | - | ||||||||||||
94 | - | |||||||||||||
95 | if (ret != len
| 0-182 | ||||||||||||
96 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||||||||
97 | - | |||||||||||||
98 | (*__errno_location ()) | - | ||||||||||||
99 | = pre_errno; | - | ||||||||||||
100 | return executed 182 times by 27 tests: (0);return (0); Executed by:
executed 182 times by 27 tests: return (0); Executed by:
| 182 | ||||||||||||
101 | } | - | ||||||||||||
102 | - | |||||||||||||
103 | - | |||||||||||||
104 | static int | - | ||||||||||||
105 | getentropy_urandom(void *buf, size_t len) | - | ||||||||||||
106 | { | - | ||||||||||||
107 | struct stat st; | - | ||||||||||||
108 | size_t i; | - | ||||||||||||
109 | int fd, cnt, flags; | - | ||||||||||||
110 | int save_errno = | - | ||||||||||||
111 | (*__errno_location ()) | - | ||||||||||||
112 | ; | - | ||||||||||||
113 | - | |||||||||||||
114 | start: code before this statement never executed: start: | 0 | ||||||||||||
115 | - | |||||||||||||
116 | flags = | - | ||||||||||||
117 | 00 | - | ||||||||||||
118 | ; | - | ||||||||||||
119 | - | |||||||||||||
120 | flags |= | - | ||||||||||||
121 | 0400000 | - | ||||||||||||
122 | ; | - | ||||||||||||
123 | - | |||||||||||||
124 | - | |||||||||||||
125 | flags |= | - | ||||||||||||
126 | 02000000 | - | ||||||||||||
127 | ; | - | ||||||||||||
128 | - | |||||||||||||
129 | fd = open("/dev/urandom", flags, 0); | - | ||||||||||||
130 | if (fd == -1
| 0 | ||||||||||||
131 | if ( | - | ||||||||||||
132 | (*
| 0 | ||||||||||||
133 | ==
| 0 | ||||||||||||
134 | 4
| 0 | ||||||||||||
135 | ) | - | ||||||||||||
136 | goto never executed: start;goto start; never executed: goto start; | 0 | ||||||||||||
137 | goto never executed: nodevrandom;goto nodevrandom; never executed: goto nodevrandom; | 0 | ||||||||||||
138 | } | - | ||||||||||||
139 | - | |||||||||||||
140 | - | |||||||||||||
141 | - | |||||||||||||
142 | - | |||||||||||||
143 | - | |||||||||||||
144 | if (fstat(fd, &st) == -1
| 0 | ||||||||||||
145 | ((((
| 0 | ||||||||||||
146 | st.st_mode
| 0 | ||||||||||||
147 | )) & 0170000) == (0020000))
| 0 | ||||||||||||
148 | ) { | - | ||||||||||||
149 | close(fd); | - | ||||||||||||
150 | goto never executed: nodevrandom;goto nodevrandom; never executed: goto nodevrandom; | 0 | ||||||||||||
151 | } | - | ||||||||||||
152 | if (ioctl(fd,
| 0 | ||||||||||||
153 | (((2U) << (((0 +8)+8)+14)) | ((('R')) << (0 +8)) | (((0x00)) << 0) | ((((sizeof(int)))) << ((0 +8)+8)))
| 0 | ||||||||||||
154 | , &cnt) == -1
| 0 | ||||||||||||
155 | close(fd); | - | ||||||||||||
156 | goto never executed: nodevrandom;goto nodevrandom; never executed: goto nodevrandom; | 0 | ||||||||||||
157 | } | - | ||||||||||||
158 | for (i = 0; i < len
| 0 | ||||||||||||
159 | size_t wanted = len - i; | - | ||||||||||||
160 | ssize_t ret = read(fd, (char *)buf + i, wanted); | - | ||||||||||||
161 | - | |||||||||||||
162 | if (ret == -1
| 0 | ||||||||||||
163 | if ( | - | ||||||||||||
164 | (*
| 0 | ||||||||||||
165 | ==
| 0 | ||||||||||||
166 | 11
| 0 | ||||||||||||
167 | || | - | ||||||||||||
168 | (*
| 0 | ||||||||||||
169 | ==
| 0 | ||||||||||||
170 | 4
| 0 | ||||||||||||
171 | ) | - | ||||||||||||
172 | continue; never executed: continue; | 0 | ||||||||||||
173 | close(fd); | - | ||||||||||||
174 | goto never executed: nodevrandom;goto nodevrandom; never executed: goto nodevrandom; | 0 | ||||||||||||
175 | } | - | ||||||||||||
176 | i += ret; | - | ||||||||||||
177 | } never executed: end of block | 0 | ||||||||||||
178 | close(fd); | - | ||||||||||||
179 | if (gotdata(buf, len) == 0
| 0 | ||||||||||||
180 | - | |||||||||||||
181 | (*__errno_location ()) | - | ||||||||||||
182 | = save_errno; | - | ||||||||||||
183 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||
184 | } | - | ||||||||||||
185 | nodevrandom: code before this statement never executed: nodevrandom: | 0 | ||||||||||||
186 | - | |||||||||||||
187 | (*__errno_location ()) | - | ||||||||||||
188 | = | - | ||||||||||||
189 | 5 | - | ||||||||||||
190 | ; | - | ||||||||||||
191 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||||||||
192 | } | - | ||||||||||||
193 | - | |||||||||||||
194 | - | |||||||||||||
195 | static int | - | ||||||||||||
196 | getentropy_sysctl(void *buf, size_t len) | - | ||||||||||||
197 | { | - | ||||||||||||
198 | static int mib[] = { CTL_KERN, KERN_RANDOM, RANDOM_UUID }; | - | ||||||||||||
199 | size_t i; | - | ||||||||||||
200 | int save_errno = | - | ||||||||||||
201 | (*__errno_location ()) | - | ||||||||||||
202 | ; | - | ||||||||||||
203 | - | |||||||||||||
204 | for (i = 0; i < len
| 0 | ||||||||||||
205 | size_t chunk = (((
| 0 | ||||||||||||
206 | - | |||||||||||||
207 | - | |||||||||||||
208 | struct __sysctl_args args = { | - | ||||||||||||
209 | .name = mib, | - | ||||||||||||
210 | .nlen = 3, | - | ||||||||||||
211 | .oldval = (char *)buf + i, | - | ||||||||||||
212 | .oldlenp = &chunk, | - | ||||||||||||
213 | }; | - | ||||||||||||
214 | if (syscall(
| 0 | ||||||||||||
215 | 156
| 0 | ||||||||||||
216 | , &args) != 0
| 0 | ||||||||||||
217 | goto never executed: sysctlfailed;goto sysctlfailed; never executed: goto sysctlfailed; | 0 | ||||||||||||
218 | i += chunk; | - | ||||||||||||
219 | } never executed: end of block | 0 | ||||||||||||
220 | if (gotdata(buf, len) == 0
| 0 | ||||||||||||
221 | - | |||||||||||||
222 | (*__errno_location ()) | - | ||||||||||||
223 | = save_errno; | - | ||||||||||||
224 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||
225 | } | - | ||||||||||||
226 | sysctlfailed: code before this statement never executed: sysctlfailed: | 0 | ||||||||||||
227 | - | |||||||||||||
228 | (*__errno_location ()) | - | ||||||||||||
229 | = | - | ||||||||||||
230 | 5 | - | ||||||||||||
231 | ; | - | ||||||||||||
232 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||||||||
233 | } | - | ||||||||||||
234 | - | |||||||||||||
235 | - | |||||||||||||
236 | static const int cl[] = { | - | ||||||||||||
237 | - | |||||||||||||
238 | 0 | - | ||||||||||||
239 | , | - | ||||||||||||
240 | - | |||||||||||||
241 | - | |||||||||||||
242 | 1 | - | ||||||||||||
243 | , | - | ||||||||||||
244 | - | |||||||||||||
245 | - | |||||||||||||
246 | - | |||||||||||||
247 | 4 | - | ||||||||||||
248 | , | - | ||||||||||||
249 | - | |||||||||||||
250 | - | |||||||||||||
251 | - | |||||||||||||
252 | 11 | - | ||||||||||||
253 | , | - | ||||||||||||
254 | - | |||||||||||||
255 | 2 | - | ||||||||||||
256 | , | - | ||||||||||||
257 | - | |||||||||||||
258 | - | |||||||||||||
259 | - | |||||||||||||
260 | 3 | - | ||||||||||||
261 | , | - | ||||||||||||
262 | - | |||||||||||||
263 | }; | - | ||||||||||||
264 | - | |||||||||||||
265 | static int | - | ||||||||||||
266 | getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data) | - | ||||||||||||
267 | { | - | ||||||||||||
268 | SHA512_CTX *ctx = data; | - | ||||||||||||
269 | - | |||||||||||||
270 | SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr)); | - | ||||||||||||
271 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||
272 | } | - | ||||||||||||
273 | - | |||||||||||||
274 | static int | - | ||||||||||||
275 | getentropy_fallback(void *buf, size_t len) | - | ||||||||||||
276 | { | - | ||||||||||||
277 | uint8_t results[64]; | - | ||||||||||||
278 | int save_errno = | - | ||||||||||||
279 | (*__errno_location ()) | - | ||||||||||||
280 | , e, pgs = getpagesize(), faster = 0, repeat; | - | ||||||||||||
281 | static int cnt; | - | ||||||||||||
282 | struct timespec ts; | - | ||||||||||||
283 | struct timeval tv; | - | ||||||||||||
284 | struct rusage ru; | - | ||||||||||||
285 | sigset_t sigset; | - | ||||||||||||
286 | struct stat st; | - | ||||||||||||
287 | SHA512_CTX ctx; | - | ||||||||||||
288 | static pid_t lastpid; | - | ||||||||||||
289 | pid_t pid; | - | ||||||||||||
290 | size_t i, ii, m; | - | ||||||||||||
291 | char *p; | - | ||||||||||||
292 | - | |||||||||||||
293 | pid = getpid(); | - | ||||||||||||
294 | if (lastpid == pid
| 0 | ||||||||||||
295 | faster = 1; | - | ||||||||||||
296 | repeat = 2; | - | ||||||||||||
297 | } never executed: else {end of block | 0 | ||||||||||||
298 | faster = 0; | - | ||||||||||||
299 | lastpid = pid; | - | ||||||||||||
300 | repeat = 5; | - | ||||||||||||
301 | } never executed: end of block | 0 | ||||||||||||
302 | for (i = 0; i < len
| 0 | ||||||||||||
303 | int j; | - | ||||||||||||
304 | SHA512_Init(&ctx); | - | ||||||||||||
305 | for (j = 0; j < repeat
| 0 | ||||||||||||
306 | do { if (((
| 0 | ||||||||||||
307 | ((void *)0)
| 0 | ||||||||||||
308 | )) == -1)
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
309 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
310 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
311 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
312 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(tv), sizeof (tv)));(SHA512_Update(&ctx, (char *)&(tv), sizeof (tv))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(tv), sizeof (tv))); | 0 | ||||||||||||
313 | if (e != -1
| 0 | ||||||||||||
314 | cnt += (int)tv.tv_sec; | - | ||||||||||||
315 | cnt += (int)tv.tv_usec; | - | ||||||||||||
316 | } never executed: end of block | 0 | ||||||||||||
317 | - | |||||||||||||
318 | dl_iterate_phdr(getentropy_phdr, &ctx); | - | ||||||||||||
319 | - | |||||||||||||
320 | for (ii = 0; ii < sizeof(cl)/sizeof(cl[0])
| 0 | ||||||||||||
321 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
322 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
323 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
324 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
325 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(ts), sizeof (ts)));(SHA512_Update(&ctx, (char *)&(ts), sizeof (ts))); never executed: }(SHA512_Update(&ctx, (char *)&(ts), sizeof (ts))); never executed: while (0);end of block | 0 | ||||||||||||
326 | - | |||||||||||||
327 | do { if (((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
328 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
329 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
330 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
331 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(pid), sizeof (pid)));(SHA512_Update(&ctx, (char *)&(pid), sizeof (pid))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(pid), sizeof (pid))); | 0 | ||||||||||||
332 | do { if (((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
333 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
334 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
335 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
336 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(pid), sizeof (pid)));(SHA512_Update(&ctx, (char *)&(pid), sizeof (pid))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(pid), sizeof (pid))); | 0 | ||||||||||||
337 | do { if (((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
338 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
339 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
340 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
341 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(pid), sizeof (pid)));(SHA512_Update(&ctx, (char *)&(pid), sizeof (pid))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(pid), sizeof (pid))); | 0 | ||||||||||||
342 | do { if (((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
343 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
344 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
345 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
346 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(pid), sizeof (pid)));(SHA512_Update(&ctx, (char *)&(pid), sizeof (pid))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(pid), sizeof (pid))); | 0 | ||||||||||||
347 | do { if (((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
348 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
349 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
350 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
351 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(e), sizeof (e)));(SHA512_Update(&ctx, (char *)&(e), sizeof (e))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(e), sizeof (e))); | 0 | ||||||||||||
352 | - | |||||||||||||
353 | if (!faster
| 0 | ||||||||||||
354 | ts.tv_sec = 0; | - | ||||||||||||
355 | ts.tv_nsec = 1; | - | ||||||||||||
356 | (void) nanosleep(&ts, | - | ||||||||||||
357 | ((void *)0) | - | ||||||||||||
358 | ); | - | ||||||||||||
359 | } never executed: end of block | 0 | ||||||||||||
360 | - | |||||||||||||
361 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
362 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
363 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
364 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
365 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(sigset), sizeof (sigset)));(SHA512_Update(&ctx, (char *)&(sigset), sizeof (sigset))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(sigset), sizeof (sigset))); | 0 | ||||||||||||
366 | do { if ((
| 0 | ||||||||||||
367 | 0
| 0 | ||||||||||||
368 | ,
| 0 | ||||||||||||
369 | ((void *)0)
| 0 | ||||||||||||
370 | , &sigset) == -1)
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
371 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
372 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
373 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
374 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(sigset), sizeof (sigset)));(SHA512_Update(&ctx, (char *)&(sigset), sizeof (sigset))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(sigset), sizeof (sigset))); | 0 | ||||||||||||
375 | ; | - | ||||||||||||
376 | - | |||||||||||||
377 | (SHA512_Update(&ctx, (char *)&(getentropy), sizeof (void*))); | - | ||||||||||||
378 | (SHA512_Update(&ctx, (char *)&(printf), sizeof (void*))); | - | ||||||||||||
379 | p = (char *)&p; | - | ||||||||||||
380 | (SHA512_Update(&ctx, (char *)&(p), sizeof (p))); | - | ||||||||||||
381 | p = (char *)& | - | ||||||||||||
382 | (*__errno_location ()) | - | ||||||||||||
383 | ; | - | ||||||||||||
384 | (SHA512_Update(&ctx, (char *)&(p), sizeof (p))); | - | ||||||||||||
385 | - | |||||||||||||
386 | if (i == 0
| 0 | ||||||||||||
387 | struct sockaddr_storage ss; | - | ||||||||||||
388 | struct statvfs stvfs; | - | ||||||||||||
389 | struct termios tios; | - | ||||||||||||
390 | struct statfs stfs; | - | ||||||||||||
391 | socklen_t ssl; | - | ||||||||||||
392 | off_t off; | - | ||||||||||||
393 | - | |||||||||||||
394 | - | |||||||||||||
395 | - | |||||||||||||
396 | - | |||||||||||||
397 | - | |||||||||||||
398 | struct mm { | - | ||||||||||||
399 | size_t npg; | - | ||||||||||||
400 | void *p; | - | ||||||||||||
401 | } mm[] = { | - | ||||||||||||
402 | { 17, | - | ||||||||||||
403 | ((void *) -1) | - | ||||||||||||
404 | }, { 3, | - | ||||||||||||
405 | ((void *) -1) | - | ||||||||||||
406 | }, | - | ||||||||||||
407 | { 11, | - | ||||||||||||
408 | ((void *) -1) | - | ||||||||||||
409 | }, { 2, | - | ||||||||||||
410 | ((void *) -1) | - | ||||||||||||
411 | }, | - | ||||||||||||
412 | { 5, | - | ||||||||||||
413 | ((void *) -1) | - | ||||||||||||
414 | }, { 3, | - | ||||||||||||
415 | ((void *) -1) | - | ||||||||||||
416 | }, | - | ||||||||||||
417 | { 7, | - | ||||||||||||
418 | ((void *) -1) | - | ||||||||||||
419 | }, { 1, | - | ||||||||||||
420 | ((void *) -1) | - | ||||||||||||
421 | }, | - | ||||||||||||
422 | { 57, | - | ||||||||||||
423 | ((void *) -1) | - | ||||||||||||
424 | }, { 3, | - | ||||||||||||
425 | ((void *) -1) | - | ||||||||||||
426 | }, | - | ||||||||||||
427 | { 131, | - | ||||||||||||
428 | ((void *) -1) | - | ||||||||||||
429 | }, { 1, | - | ||||||||||||
430 | ((void *) -1) | - | ||||||||||||
431 | }, | - | ||||||||||||
432 | }; | - | ||||||||||||
433 | - | |||||||||||||
434 | for (m = 0; m < sizeof mm/sizeof(mm[0])
| 0 | ||||||||||||
435 | do { if ((
| 0 | ||||||||||||
436 | ((void *)0)
| 0 | ||||||||||||
437 | , mm[m].npg * pgs,
| 0 | ||||||||||||
438 | 0x1
| 0 | ||||||||||||
439 | |
| 0 | ||||||||||||
440 | 0x2
| 0 | ||||||||||||
441 | ,
| 0 | ||||||||||||
442 | 0x02
| 0 | ||||||||||||
443 | |
| 0 | ||||||||||||
444 | 0x20
| 0 | ||||||||||||
445 | , -1, (off_t)0))
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
446 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
447 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
448 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
449 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(mm[m].p), sizeof (mm[m].p)));(SHA512_Update(&ctx, (char *)&(mm[m].p), sizeof (mm[m].p))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(mm[m].p), sizeof (mm[m].p))); | 0 | ||||||||||||
450 | - | |||||||||||||
451 | - | |||||||||||||
452 | - | |||||||||||||
453 | ; | - | ||||||||||||
454 | if (mm[m].p !=
| 0 | ||||||||||||
455 | ((void *) -1)
| 0 | ||||||||||||
456 | ) { | - | ||||||||||||
457 | size_t mo; | - | ||||||||||||
458 | - | |||||||||||||
459 | - | |||||||||||||
460 | p = mm[m].p; | - | ||||||||||||
461 | mo = cnt % | - | ||||||||||||
462 | (mm[m].npg * pgs - 1); | - | ||||||||||||
463 | p[mo] = 1; | - | ||||||||||||
464 | cnt += (int)((long)(mm[m].p) | - | ||||||||||||
465 | / pgs); | - | ||||||||||||
466 | } never executed: end of block | 0 | ||||||||||||
467 | - | |||||||||||||
468 | - | |||||||||||||
469 | for (ii = 0; ii < sizeof(cl)/sizeof(cl[0])
| 0 | ||||||||||||
470 | ii++) { | - | ||||||||||||
471 | do { if (((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
472 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
473 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
474 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
475 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(ts), sizeof (ts)));(SHA512_Update(&ctx, (char *)&(ts), sizeof (ts))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(ts), sizeof (ts))); | 0 | ||||||||||||
476 | ; | - | ||||||||||||
477 | if (e != -1
| 0 | ||||||||||||
478 | cnt += (int)ts.tv_nsec; never executed: cnt += (int)ts.tv_nsec; | 0 | ||||||||||||
479 | } never executed: end of block | 0 | ||||||||||||
480 | - | |||||||||||||
481 | do { if (((
| 0 | ||||||||||||
482 | RUSAGE_SELF
| 0 | ||||||||||||
483 | , &ru)) == -1)
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
484 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
485 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
486 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
487 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(ru), sizeof (ru)));(SHA512_Update(&ctx, (char *)&(ru), sizeof (ru))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(ru), sizeof (ru))); | 0 | ||||||||||||
488 | ; | - | ||||||||||||
489 | if (e != -1
| 0 | ||||||||||||
490 | cnt += (int)ru.ru_utime.tv_sec; | - | ||||||||||||
491 | cnt += (int)ru.ru_utime.tv_usec; | - | ||||||||||||
492 | } never executed: end of block | 0 | ||||||||||||
493 | } never executed: end of block | 0 | ||||||||||||
494 | - | |||||||||||||
495 | for (m = 0; m < sizeof mm/sizeof(mm[0])
| 0 | ||||||||||||
496 | if (mm[m].p !=
| 0 | ||||||||||||
497 | ((void *) -1)
| 0 | ||||||||||||
498 | ) | - | ||||||||||||
499 | munmap(mm[m].p, mm[m].npg * pgs); never executed: munmap(mm[m].p, mm[m].npg * pgs); | 0 | ||||||||||||
500 | mm[m].p = | - | ||||||||||||
501 | ((void *) -1) | - | ||||||||||||
502 | ; | - | ||||||||||||
503 | } never executed: end of block | 0 | ||||||||||||
504 | - | |||||||||||||
505 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
506 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
507 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
508 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
509 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(st), sizeof (st)));(SHA512_Update(&ctx, (char *)&(st), sizeof (st))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(st), sizeof (st))); | 0 | ||||||||||||
510 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
511 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
512 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
513 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
514 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(stvfs), sizeof (stvfs)));(SHA512_Update(&ctx, (char *)&(stvfs), sizeof (stvfs))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(stvfs), sizeof (stvfs))); | 0 | ||||||||||||
515 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
516 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
517 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
518 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
519 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(stfs), sizeof (stfs)));(SHA512_Update(&ctx, (char *)&(stfs), sizeof (stfs))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(stfs), sizeof (stfs))); | 0 | ||||||||||||
520 | - | |||||||||||||
521 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
522 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
523 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
524 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
525 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(st), sizeof (st)));(SHA512_Update(&ctx, (char *)&(st), sizeof (st))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(st), sizeof (st))); | 0 | ||||||||||||
526 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
527 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
528 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
529 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
530 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(stvfs), sizeof (stvfs)));(SHA512_Update(&ctx, (char *)&(stvfs), sizeof (stvfs))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(stvfs), sizeof (stvfs))); | 0 | ||||||||||||
531 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
532 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
533 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
534 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
535 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(stfs), sizeof (stfs)));(SHA512_Update(&ctx, (char *)&(stfs), sizeof (stfs))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(stfs), sizeof (stfs))); | 0 | ||||||||||||
536 | - | |||||||||||||
537 | do { if (((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
538 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
539 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
540 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
541 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(st), sizeof (st)));(SHA512_Update(&ctx, (char *)&(st), sizeof (st))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(st), sizeof (st))); | 0 | ||||||||||||
542 | if (e == -1
| 0 | ||||||||||||
543 | if ( | - | ||||||||||||
544 | ((((
| 0 | ||||||||||||
545 | st.st_mode
| 0 | ||||||||||||
546 | )) & 0170000) == (0100000))
| 0 | ||||||||||||
547 | || | - | ||||||||||||
548 | - | |||||||||||||
549 | ((((
| 0 | ||||||||||||
550 | st.st_mode
| 0 | ||||||||||||
551 | )) & 0170000) == (0010000))
| 0 | ||||||||||||
552 | || | - | ||||||||||||
553 | - | |||||||||||||
554 | ((((
| 0 | ||||||||||||
555 | st.st_mode
| 0 | ||||||||||||
556 | )) & 0170000) == (0140000))
| 0 | ||||||||||||
557 | ) { | - | ||||||||||||
558 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
559 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
560 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
561 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
562 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(stvfs), sizeof (stvfs)));(SHA512_Update(&ctx, (char *)&(stvfs), sizeof (stvfs))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(stvfs), sizeof (stvfs))); | 0 | ||||||||||||
563 | ; | - | ||||||||||||
564 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
565 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
566 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
567 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
568 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(stfs), sizeof (stfs)));(SHA512_Update(&ctx, (char *)&(stfs), sizeof (stfs))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(stfs), sizeof (stfs))); | 0 | ||||||||||||
569 | ; | - | ||||||||||||
570 | do { if (((
| 0 | ||||||||||||
571 | 1
| 0 | ||||||||||||
572 | )) < 0)
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
573 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
574 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
575 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
576 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(off), sizeof (off)));(SHA512_Update(&ctx, (char *)&(off), sizeof (off))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(off), sizeof (off))); | 0 | ||||||||||||
577 | ; | - | ||||||||||||
578 | } never executed: end of block | 0 | ||||||||||||
579 | if ( | - | ||||||||||||
580 | ((((
| 0 | ||||||||||||
581 | st.st_mode
| 0 | ||||||||||||
582 | )) & 0170000) == (0020000))
| 0 | ||||||||||||
583 | ) { | - | ||||||||||||
584 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
585 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
586 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
587 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
588 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(tios), sizeof (tios)));(SHA512_Update(&ctx, (char *)&(tios), sizeof (tios))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(tios), sizeof (tios))); | 0 | ||||||||||||
589 | ; | - | ||||||||||||
590 | } never executed: else if (end of block | 0 | ||||||||||||
591 | ((((
| 0 | ||||||||||||
592 | st.st_mode
| 0 | ||||||||||||
593 | )) & 0170000) == (0140000))
| 0 | ||||||||||||
594 | ) { | - | ||||||||||||
595 | memset(&ss, 0, sizeof ss); | - | ||||||||||||
596 | ssl = sizeof(ss); | - | ||||||||||||
597 | do { if ((
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
598 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
599 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
600 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
601 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(ss), sizeof (ss)));(SHA512_Update(&ctx, (char *)&(ss), sizeof (ss))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(ss), sizeof (ss))); | 0 | ||||||||||||
602 | - | |||||||||||||
603 | ; | - | ||||||||||||
604 | } never executed: end of block | 0 | ||||||||||||
605 | } never executed: end of block | 0 | ||||||||||||
606 | - | |||||||||||||
607 | do { if (((
| 0 | ||||||||||||
608 | RUSAGE_CHILDREN
| 0 | ||||||||||||
609 | , &ru)) == -1)
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
610 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
611 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
612 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
613 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(ru), sizeof (ru)));(SHA512_Update(&ctx, (char *)&(ru), sizeof (ru))); never executed: } while (0)(SHA512_Update(&ctx, (char *)&(ru), sizeof (ru))); | 0 | ||||||||||||
614 | ; | - | ||||||||||||
615 | if (e != -1
| 0 | ||||||||||||
616 | cnt += (int)ru.ru_utime.tv_sec; | - | ||||||||||||
617 | cnt += (int)ru.ru_utime.tv_usec; | - | ||||||||||||
618 | } never executed: end of block | 0 | ||||||||||||
619 | } never executed: else {end of block | 0 | ||||||||||||
620 | - | |||||||||||||
621 | (SHA512_Update(&ctx, (char *)&(results), sizeof (results))); | - | ||||||||||||
622 | } never executed: end of block | 0 | ||||||||||||
623 | - | |||||||||||||
624 | do { if (((
| 0 | ||||||||||||
625 | ((void *)0)
| 0 | ||||||||||||
626 | )) == -1)
never executed: SHA512_Update(&ctx, (char *)&((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
627 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
628 | ), sizeof ( never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
629 | (*__errno_location ()) never executed: (SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); | 0 | ||||||||||||
630 | ))); never executed: else ((SHA512_Update(&ctx, (char *)&( (*__errno_location ()) ), sizeof ( (*__errno_location ()) ))); never executed: SHA512_Update(&ctx, (char *)&(tv), sizeof (tv)));(SHA512_Update(&ctx, (char *)&(tv), sizeof (tv))); never executed: } while (0);(SHA512_Update(&ctx, (char *)&(tv), sizeof (tv))); | 0 | ||||||||||||
631 | if (e != -1
| 0 | ||||||||||||
632 | cnt += (int)tv.tv_sec; | - | ||||||||||||
633 | cnt += (int)tv.tv_usec; | - | ||||||||||||
634 | } never executed: end of block | 0 | ||||||||||||
635 | - | |||||||||||||
636 | (SHA512_Update(&ctx, (char *)&(cnt), sizeof (cnt))); | - | ||||||||||||
637 | } never executed: end of block | 0 | ||||||||||||
638 | - | |||||||||||||
639 | - | |||||||||||||
640 | - | |||||||||||||
641 | p = (char *) getauxval( | - | ||||||||||||
642 | 25 | - | ||||||||||||
643 | ); | - | ||||||||||||
644 | if (p
| 0 | ||||||||||||
645 | ( never executed: SHA512_Update(&ctx, (char *)(p), (16)));(SHA512_Update(&ctx, (char *)(p), (16))); never executed: (SHA512_Update(&ctx, (char *)(p), (16))); | 0 | ||||||||||||
646 | - | |||||||||||||
647 | - | |||||||||||||
648 | p = (char *) getauxval( | - | ||||||||||||
649 | 33 | - | ||||||||||||
650 | ); | - | ||||||||||||
651 | if (p
| 0 | ||||||||||||
652 | ( never executed: SHA512_Update(&ctx, (char *)(p), (pgs)));(SHA512_Update(&ctx, (char *)(p), (pgs))); never executed: (SHA512_Update(&ctx, (char *)(p), (pgs))); | 0 | ||||||||||||
653 | - | |||||||||||||
654 | - | |||||||||||||
655 | p = (char *) getauxval( | - | ||||||||||||
656 | 7 | - | ||||||||||||
657 | ); | - | ||||||||||||
658 | if (p
| 0 | ||||||||||||
659 | ( never executed: SHA512_Update(&ctx, (char *)&(p), sizeof (p)));(SHA512_Update(&ctx, (char *)&(p), sizeof (p))); never executed: (SHA512_Update(&ctx, (char *)&(p), sizeof (p))); | 0 | ||||||||||||
660 | - | |||||||||||||
661 | - | |||||||||||||
662 | - | |||||||||||||
663 | SHA512_Final(results, &ctx); | - | ||||||||||||
664 | memcpy((char *)buf + i, results, (((sizeof(results)) < (len - i)) ? (sizeof(results)) : (len - i))); | - | ||||||||||||
665 | i += (((
| 0 | ||||||||||||
666 | } never executed: end of block | 0 | ||||||||||||
667 | explicit_bzero(&ctx, sizeof ctx); | - | ||||||||||||
668 | explicit_bzero(results, sizeof results); | - | ||||||||||||
669 | if (gotdata(buf, len) == 0
| 0 | ||||||||||||
670 | - | |||||||||||||
671 | (*__errno_location ()) | - | ||||||||||||
672 | = save_errno; | - | ||||||||||||
673 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||
674 | } | - | ||||||||||||
675 | - | |||||||||||||
676 | (*__errno_location ()) | - | ||||||||||||
677 | = | - | ||||||||||||
678 | 5 | - | ||||||||||||
679 | ; | - | ||||||||||||
680 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||||||||
681 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |