From c3b48c6b0bf501802295c85b1cf54275d6b74883 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 10 Oct 2024 01:20:07 +0200 Subject: Disable snprintf/sprintf hardening for now --- include/stdio.h | 2 ++ tests/test_asprintf.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/stdio.h b/include/stdio.h index 3e31f29..200a176 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -243,6 +243,7 @@ _FORTIFY_FN(vasprintf) int vasprintf(char **strp, const char *fmt, __builtin_va_ #endif // __clang__ +#if 0 #if __has_builtin(__builtin_va_arg_pack) /* clang is missing __builtin_va_arg_pack, so we cannot use these impls @@ -356,6 +357,7 @@ _FORTIFY_FN(asprintf) int asprintf(char **strp, const char *fmt, ...) #pragma GCC diagnostic pop #endif /* __has_builtin(__builtin_va_arg_pack) */ +#endif #ifdef __cplusplus } diff --git a/tests/test_asprintf.c b/tests/test_asprintf.c index a02d110..67723e8 100644 --- a/tests/test_asprintf.c +++ b/tests/test_asprintf.c @@ -11,9 +11,11 @@ int main(int argc, char** argv) { puts(buf); free(buf); +#if 0 #ifndef __clang__ asprintf(&buf, "total: %", 1); assert(buf == NULL); +#endif #endif return 0; -- cgit v1.3