summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-22 17:11:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-22 17:11:53 +0000
commitc2d6d947a2b5fc76dfb0ad5d880cc943f2dd8269 (patch)
tree654bc8feea42ea6a1fbfc488b085010f087754af /cppuhelper
parent95ff4bb714d0814b40de723cd7fa7f120b88bbc8 (diff)
coverity#705457 Dereference null return value
Change-Id: Ifde26af3d00fee3aa52afafa3986ef180be39908
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/findsofficepath.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cppuhelper/source/findsofficepath.c b/cppuhelper/source/findsofficepath.c
index 0f1245f33040..1c24d802b73f 100644
--- a/cppuhelper/source/findsofficepath.c
+++ b/cppuhelper/source/findsofficepath.c
@@ -131,6 +131,8 @@ static char* platformSpecific()
/* get the value of the PATH environment variable */
env = getenv( PATHVARNAME );
+ if (env == NULL)
+ return NULL;
str = (char*) malloc( strlen( env ) + 1 );
strcpy( str, env );