diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-13 06:21:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-13 06:21:27 +0300 |
commit | 867fc4b463ef39ea16103f18f332c3d259624d29 (patch) | |
tree | 7d20c416241afb7b878b767a9955e284d3cddbe2 /source/blender/blenlib/intern/storage.c | |
parent | 9e03a0d4762b4734fe7ccb20e03b4a3c8f939620 (diff) |
enforce string limits (reported by pedantic checking tools & some developers).
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
Diffstat (limited to 'source/blender/blenlib/intern/storage.c')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index eaa312b82f9..c2605a15ad8 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -103,7 +103,7 @@ static struct ListBase dirbase_={ 0,0}; static struct ListBase *dirbase = &dirbase_; - +/* can return NULL when the size is not big enough */ char *BLI_getwdN(char *dir, const int maxncpy) { const char *pwd= getenv("PWD"); |