diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-28 01:31:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-28 01:31:24 +0300 |
commit | 4b18114e31ea277f9961ea279579da4157ecc2d7 (patch) | |
tree | 575aba1797755004c60d08c382886fb000dd0d2a /src/fs/virtfszip.h | |
parent | 6ebd6c0f16cf15bb455b81ca571ef88bac381655 (diff) | |
download | plus-4b18114e31ea277f9961ea279579da4157ecc2d7.tar.gz plus-4b18114e31ea277f9961ea279579da4157ecc2d7.tar.bz2 plus-4b18114e31ea277f9961ea279579da4157ecc2d7.tar.xz plus-4b18114e31ea277f9961ea279579da4157ecc2d7.zip |
Add path sanitization in virtfszip and zip.
Diffstat (limited to 'src/fs/virtfszip.h')
-rw-r--r-- | src/fs/virtfszip.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fs/virtfszip.h b/src/fs/virtfszip.h index 81feb3693..d66ce7ee8 100644 --- a/src/fs/virtfszip.h +++ b/src/fs/virtfszip.h @@ -39,9 +39,9 @@ namespace VirtFsZip { VirtZipEntry *searchEntryByArchive(const std::string &restrict archiveName); ZipLocalHeader *searchHeaderByName(const std::string &restrict filename); - bool addToSearchPath(const std::string &newDir, + bool addToSearchPath(std::string newDir, const Append append); - bool addToSearchPathSilent(const std::string &newDir, + bool addToSearchPathSilent(std::string newDir, const Append append); bool removeFromSearchPath(std::string oldDir); bool removeFromSearchPathSilent(std::string oldDir); @@ -49,16 +49,16 @@ namespace VirtFsZip void initFuncs(VirtFsFuncs *restrict const ptr); void deinit(); std::vector<VirtZipEntry*> &getEntries(); - bool exists(const std::string &restrict name); + bool exists(std::string name); VirtList *enumerateFiles(std::string dir) RETURNS_NONNULL; bool isDirectory(std::string dirName); - bool isSymbolicLink(const std::string &restrict name); + bool isSymbolicLink(std::string name); void freeList(VirtList *restrict const handle); - VirtFile *openRead(const std::string &restrict filename); + VirtFile *openRead(std::string filename); VirtFile *openWrite(const std::string &restrict filename); VirtFile *openAppend(const std::string &restrict filename); bool setWriteDir(const std::string &restrict newDir); - std::string getRealDir(const std::string &restrict filename); + std::string getRealDir(std::string filename); bool mkdir(const std::string &restrict dirName); bool remove(const std::string &restrict filename); void permitLinks(const bool val); |