From 867fc4b463ef39ea16103f18f332c3d259624d29 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 13 Feb 2011 03:21:27 +0000 Subject: 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. --- source/blender/blenlib/intern/storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenlib/intern/storage.c') 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"); -- cgit v1.2.3