summaryrefslogtreecommitdiff
path: root/src/common/grfio.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-05-02 20:54:56 +0300
committerAndrei Karas <akaras@inbox.ru>2018-05-02 20:54:56 +0300
commit6e00588ebfe9441f793c304d42cf3c83463abe0c (patch)
tree193104da0512521ffa939e2b4dc5bf927794bb11 /src/common/grfio.c
parent0622261073b6f4f0160cb0df150d3e07483d9b1b (diff)
downloadhercules-6e00588ebfe9441f793c304d42cf3c83463abe0c.tar.gz
hercules-6e00588ebfe9441f793c304d42cf3c83463abe0c.tar.bz2
hercules-6e00588ebfe9441f793c304d42cf3c83463abe0c.tar.xz
hercules-6e00588ebfe9441f793c304d42cf3c83463abe0c.zip
Fix possible buffer overflow in common.
Diffstat (limited to 'src/common/grfio.c')
-rw-r--r--src/common/grfio.c4
1 files changed, 2 insertions, 2 deletions
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) {