aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-08-03 16:25:00 +0200
committerUlrich Sibiller <uli42@gmx.de>2021-01-15 19:50:34 +0100
commit1529b32174867acaffc952b77cb404180fad17f1 (patch)
tree183353835cf8e82bed0860f041d00dca106e5d55 /nx-X11
parent3523d15e2a9f84e2136e3370129a9bea0e16e072 (diff)
downloadnx-libs-1529b32174867acaffc952b77cb404180fad17f1.tar.gz
nx-libs-1529b32174867acaffc952b77cb404180fad17f1.tar.bz2
nx-libs-1529b32174867acaffc952b77cb404180fad17f1.zip
Atoms.c: fix strlen(NULL)
FIX PVS Studio finding "V575 The potential null pointer is passed into 'strlen' function. Inspect the first argument"
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Atoms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
index c15674f5e..af8b31dfd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
@@ -417,7 +417,7 @@ static void nxagentWriteAtom(Atom local, XlibAtom remote, const char *string)
privAtomMap[privLastAtom].local = local;
privAtomMap[privLastAtom].remote = remote;
privAtomMap[privLastAtom].string = s;
- privAtomMap[privLastAtom].length = strlen(s);
+ privAtomMap[privLastAtom].length = s ? strlen(s) : 0;
privLastAtom++;
}