blob: b2b9a79c40c897e6bf5d2e5dea51c23d9210414f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*-
* SPDF-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2024 Robert Clausecker <fuz@FreeBSD.org>
*/
#include <string.h>
#include <ssp/ssp.h>
__attribute__((weak)) void __memset_explicit_hook(void *, int, size_t);
__attribute__((weak)) void
__memset_explicit_hook(void *buf, int ch, size_t len)
{
(void)buf;
(void)ch;
(void)len;
}
void *
__ssp_real(memset_explicit)(void *buf, int ch, size_t len)
{
memset(buf, ch, len);
__memset_explicit_hook(buf, ch, len);
return (buf);
}
|