diff options
author | Haru <haru@dotalux.com> | 2018-05-06 17:52:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-06 17:52:22 +0200 |
commit | b889108f6dea3e1765681b9eaf4a39a18c24eeec (patch) | |
tree | 40e2b55d2e4d1f4a38a0a36be7f9920dd9637ce4 /src/common/grfio.c | |
parent | d6785d389cbee4f34078f6762626ca61b2d6cc25 (diff) | |
parent | ed8fac40e2d6cbf11b9a4a1a8182cd28871e3e6d (diff) | |
download | hercules-b889108f6dea3e1765681b9eaf4a39a18c24eeec.tar.gz hercules-b889108f6dea3e1765681b9eaf4a39a18c24eeec.tar.bz2 hercules-b889108f6dea3e1765681b9eaf4a39a18c24eeec.tar.xz hercules-b889108f6dea3e1765681b9eaf4a39a18c24eeec.zip |
Merge pull request #2028 from 4144/warnings
Fix some possible buffer overflows.
Diffstat (limited to 'src/common/grfio.c')
-rw-r--r-- | src/common/grfio.c | 4 |
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) { |