Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/lib/libc/string/memset_explicit.c
39476 views
1
/*-
2
* SPDF-License-Identifier: BSD-2-Clause
3
*
4
* Copyright (c) 2024 Robert Clausecker <[email protected]>
5
*/
6
7
#include <string.h>
8
#include <ssp/ssp.h>
9
10
__attribute__((weak)) void __memset_explicit_hook(void *, int, size_t);
11
12
__attribute__((weak)) void
13
__memset_explicit_hook(void *buf, int ch, size_t len)
14
{
15
(void)buf;
16
(void)ch;
17
(void)len;
18
}
19
20
void *
21
__ssp_real(memset_explicit)(void *buf, int ch, size_t len)
22
{
23
memset(buf, ch, len);
24
__memset_explicit_hook(buf, ch, len);
25
26
return (buf);
27
}
28
29