From 54eb7b326e72eb56ab5a771e232f5d9c2d8968c5 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Tue, 30 Jan 2018 15:40:23 +0000 Subject: [PATCH] Fix potential NULL dereference warnings --- src/charname.c | 3 ++- src/fr-charname.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/charname.c b/src/charname.c index d6eb278..45caa19 100644 --- a/src/charname.c +++ b/src/charname.c @@ -83,6 +83,7 @@ ucs2_to_charname (int ucs2) /* Return the result. */ - *out = NUL; + if (out) + *out = NUL; return result; } diff --git a/src/fr-charname.c b/src/fr-charname.c index 17b194e..84c6d72 100644 --- a/src/fr-charname.c +++ b/src/fr-charname.c @@ -83,6 +83,7 @@ ucs2_to_french_charname (int ucs2) /* Return the result. */ - *out = NUL; + if (out) + *out = NUL; return result; } -- 2.40.0