Commit 1529b321 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Atoms.c: fix strlen(NULL)

FIX PVS Studio finding "V575 The potential null pointer is passed into 'strlen' function. Inspect the first argument"
parent 3523d15e
......@@ -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++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment