mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4268 libecl : Apply patch for handling of null pointer in util_access
This commit is contained in:
parent
38c2097e35
commit
738fc8e283
7
ThirdParty/Ert/lib/util/util.c
vendored
7
ThirdParty/Ert/lib/util/util.c
vendored
@ -2153,10 +2153,7 @@ int util_fmove( FILE * stream , long offset , long shift) {
|
||||
#ifdef HAVE_WINDOWS__ACCESS
|
||||
|
||||
bool util_access(const char * entry, int mode) {
|
||||
if (!entry)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!entry) return false;
|
||||
|
||||
return (_access(entry, mode) == 0);
|
||||
}
|
||||
@ -2165,6 +2162,8 @@ bool util_access(const char * entry, int mode) {
|
||||
|
||||
#ifdef HAVE_POSIX_ACCESS
|
||||
bool util_access(const char * entry, mode_t mode) {
|
||||
if (!entry) return false;
|
||||
|
||||
return (access(entry, mode) == 0);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user