| 1 | /* |
| 2 | * SPDX-License-Identifier: LGPL-2.1-or-later |
| 3 | * |
| 4 | * Copyright (C) 2009 Pierre-Marc Fournier |
| 5 | */ |
| 6 | |
| 7 | #ifndef _UST_COMMON_SAFE_SNPRINTF_H |
| 8 | #define _UST_COMMON_SAFE_SNPRINTF_H |
| 9 | |
| 10 | #include <stdarg.h> |
| 11 | #include <stddef.h> |
| 12 | |
| 13 | int ust_safe_vsnprintf(char *str, size_t n, const char *fmt, va_list ap) |
| 14 | __attribute__((visibility("hidden"))); |
| 15 | |
| 16 | int ust_safe_snprintf(char *str, size_t n, const char *fmt, ...) |
| 17 | __attribute__((visibility("hidden"))) |
| 18 | __attribute__((format(printf, 3, 4))); |
| 19 | |
| 20 | #endif /* _UST_COMMON_SAFE_SNPRINTF_H */ |