fix more issues reported by coverity

This commit is contained in:
David Hrdlička
2020-01-15 18:48:22 +01:00
parent 94ba8ec38c
commit a575bd7e8b
9 changed files with 23 additions and 13 deletions

View File

@@ -530,7 +530,7 @@ zip_load(zip_t *dev, wchar_t *fn)
if (fseek(dev->drv->f, dev->drv->base, SEEK_SET) == -1)
fatal("zip_load(): Error seeking to the beginning of the file\n");
memcpy(dev->drv->image_path, fn, sizeof(dev->drv->image_path));
wcsncpy(dev->drv->image_path, fn, sizeof_w(dev->drv->image_path));
return 1;
}