From 6e00588ebfe9441f793c304d42cf3c83463abe0c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 May 2018 20:54:56 +0300 Subject: Fix possible buffer overflow in common. --- src/common/grfio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/grfio.c') diff --git a/src/common/grfio.c b/src/common/grfio.c index fba3dda86..d328f9c68 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -786,8 +786,8 @@ static bool grfio_parse_restable_row(const char *row) if (strstr(w2, ".gat") == NULL && strstr(w2, ".rsw") == NULL) return false; // we only need the maps' GAT and RSW files - sprintf(src, "data\\%s", w1); - sprintf(dst, "data\\%s", w2); + safesnprintf(src, 256, "data\\%s", w1); + safesnprintf(dst, 256, "data\\%s", w2); entry = grfio_filelist_find(dst); if (entry != NULL) { -- cgit v1.2.3-70-g09d2