]> granicus.if.org Git - recode/commitdiff
Fix potential NULL dereference warnings
authorReuben Thomas <rrt@sc3d.org>
Tue, 30 Jan 2018 15:40:23 +0000 (15:40 +0000)
committerReuben Thomas <rrt@sc3d.org>
Tue, 30 Jan 2018 17:04:27 +0000 (17:04 +0000)
src/charname.c
src/fr-charname.c

index d6eb278783cd7a5ffd62a0d3361f0fe1b79fb608..45caa193c86d3a4aac3cfe6e94bc027ac1f94b2c 100644 (file)
@@ -83,6 +83,7 @@ ucs2_to_charname (int ucs2)
 
   /* Return the result.  */
 
-  *out = NUL;
+  if (out)
+    *out = NUL;
   return result;
 }
index 17b194e905c2ace386d453cf9a425f8c14cf3b50..84c6d7287fb0e0ff02a37d42c145404351695534 100644 (file)
@@ -83,6 +83,7 @@ ucs2_to_french_charname (int ucs2)
 
   /* Return the result.  */
 
-  *out = NUL;
+  if (out)
+    *out = NUL;
   return result;
 }