[X2Go-Commits] [nx-libs] 180/429: Atoms.c: add explanation for PVS Studio warning
git-admin at x2go.org
git-admin at x2go.org
Mon Oct 18 09:36:25 CEST 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit db134de3b9cefa6e0d76fe57f2feabe79ba9216c
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Mon Jan 4 16:17:36 2021 +0100
Atoms.c: add explanation for PVS Studio warning
"V575 The potential null pointer is passed into 'strlen'
function. Inspect the first argument. Check lines: 420, 403."
---
nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
index 61953e2a6..ea7ad7599 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
@@ -409,6 +409,9 @@ static void nxagentWriteAtom(Atom local, XlibAtom remote, const char *string)
#ifdef WARNING
if (s == NULL)
{
+ /* we only warn here, because s being NULL ist not problem, it
+ will only result in NULL being stored in the privAtomMap, which
+ is perfectly legal. */
fprintf(stderr, "%s: Malloc failed.\n", __func__);
}
#endif
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list