1
0
Fork 0

Limit string copies to the target's length

This commits covers a single class of string-copy
issues, all of which involve writing an unchecked
quantity of bytes into a string of a fixed length (ie:
char[]).
This commit is contained in:
kcgen 2020-05-01 07:45:58 -07:00 committed by Patryk Obara
parent e0ab23ad67
commit e603337c17
14 changed files with 103 additions and 98 deletions

View file

@ -256,7 +256,7 @@ public:
virtual bool FileExists(const char* name)=0;
virtual bool FileStat(const char* name, FileStat_Block * const stat_block)=0;
virtual Bit8u GetMediaByte(void)=0;
virtual void SetDir(const char* path) { strcpy(curdir,path); };
virtual void SetDir(const char *path) { safe_strcpy(curdir, path); };
virtual void EmptyCache(void) { dirCache.EmptyCache(); };
virtual bool isRemote(void)=0;
virtual bool isRemovable(void)=0;