aboutsummaryrefslogtreecommitdiff
path: root/nxcomp
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-12-27 19:49:25 +0100
committerMihai Moldovan <ionic@ionic.de>2017-12-27 19:49:25 +0100
commit56dbc215666f0c0e5bdf316aab31db9b42b6920d (patch)
treea270fca4a9af19c851f81b952823ffeef784e720 /nxcomp
parent57845ced52f6a6e0fb97278bd9e9541fdce487c2 (diff)
downloadnx-libs-56dbc215666f0c0e5bdf316aab31db9b42b6920d.tar.gz
nx-libs-56dbc215666f0c0e5bdf316aab31db9b42b6920d.tar.bz2
nx-libs-56dbc215666f0c0e5bdf316aab31db9b42b6920d.zip
nxcomp/src/Log.h: make sure we don't pass NULL pointers to strstr().
Diffstat (limited to 'nxcomp')
-rw-r--r--nxcomp/src/Log.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/nxcomp/src/Log.h b/nxcomp/src/Log.h
index 9781ec8b2..d0ea627fa 100644
--- a/nxcomp/src/Log.h
+++ b/nxcomp/src/Log.h
@@ -509,7 +509,14 @@ bool has_newline(T value)
template <char*>
static bool has_newline(char *value)
{
- return strstr(value, "\n") != NULL;
+ if (value)
+ {
+ return strstr(value, "\n") != NULL;
+ }
+ else
+ {
+ return false;
+ }
}
template <char>