summaryrefslogtreecommitdiff
path: root/src/redis-check-aof.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/redis-check-aof.c')
-rw-r--r--src/redis-check-aof.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/redis-check-aof.c b/src/redis-check-aof.c
index c4d5a225e..eedb09db5 100644
--- a/src/redis-check-aof.c
+++ b/src/redis-check-aof.c
@@ -33,11 +33,11 @@
#define ERROR(...) { \
char __buf[1024]; \
- sprintf(__buf, __VA_ARGS__); \
- sprintf(error, "0x%16llx: %s", (long long)epos, __buf); \
+ snprintf(__buf, sizeof(__buf), __VA_ARGS__); \
+ snprintf(error, sizeof(error), "0x%16llx: %s", (long long)epos, __buf); \
}
-static char error[1024];
+static char error[1044];
static off_t epos;
int consumeNewline(char *buf) {