From ae9d313e4813af3bb3f939973d4b2659ad52eed3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 26 Jun 2020 20:56:58 +0200 Subject: [PATCH] Resync --- streams/file_stream.c | 3 ++- streams/rzip_stream.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/streams/file_stream.c b/streams/file_stream.c index 2266d3f..d84c6d7 100644 --- a/streams/file_stream.c +++ b/streams/file_stream.c @@ -443,7 +443,8 @@ int filestream_putc(RFILE *stream, int c) int filestream_vprintf(RFILE *stream, const char* format, va_list args) { static char buffer[8 * 1024]; - int64_t num_chars = vsprintf(buffer, format, args); + int64_t num_chars = vsnprintf(buffer, sizeof(buffer), + format, args); if (num_chars < 0) return -1; diff --git a/streams/rzip_stream.c b/streams/rzip_stream.c index df9539b..09fd34e 100644 --- a/streams/rzip_stream.c +++ b/streams/rzip_stream.c @@ -840,7 +840,8 @@ int rzipstream_putc(rzipstream_t *stream, int c) int rzipstream_vprintf(rzipstream_t *stream, const char* format, va_list args) { static char buffer[8 * 1024] = {0}; - int64_t num_chars = vsprintf(buffer, format, args); + int64_t num_chars = vsnprintf(buffer, + sizeof(buffer), format, args); if (num_chars < 0) return -1;