diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-22 17:11:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-22 17:11:53 +0000 |
commit | c2d6d947a2b5fc76dfb0ad5d880cc943f2dd8269 (patch) | |
tree | 654bc8feea42ea6a1fbfc488b085010f087754af /cppuhelper/source/findsofficepath.c | |
parent | 95ff4bb714d0814b40de723cd7fa7f120b88bbc8 (diff) |
coverity#705457 Dereference null return value
Change-Id: Ifde26af3d00fee3aa52afafa3986ef180be39908
Diffstat (limited to 'cppuhelper/source/findsofficepath.c')
-rw-r--r-- | cppuhelper/source/findsofficepath.c | 2 |
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 ); |