Nikolay Sivov : widl: Add null source pointer check for typelib writer.

Alexandre Julliard julliard at winehq.org
Thu Sep 24 15:49:04 CDT 2020


Module: wine
Branch: master
Commit: fe5bfa5b7196786633c1e702d9e6d55f0bad3ccb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=fe5bfa5b7196786633c1e702d9e6d55f0bad3ccb

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Sep 23 20:46:22 2020 +0300

widl: Add null source pointer check for typelib writer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38964
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/widl/write_msft.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c
index aa05dcfe56..440bb23f79 100644
--- a/tools/widl/write_msft.c
+++ b/tools/widl/write_msft.c
@@ -2560,7 +2560,8 @@ static void set_lib_flags(msft_typelib_t *typelib)
 
 static void ctl2_write_segment(msft_typelib_t *typelib, int segment)
 {
-    put_data(typelib->typelib_segment_data[segment], typelib->typelib_segdir[segment].length);
+    if (typelib->typelib_segment_data[segment])
+        put_data(typelib->typelib_segment_data[segment], typelib->typelib_segdir[segment].length);
 }
 
 static void ctl2_finalize_typeinfos(msft_typelib_t *typelib, int filesize)




More information about the wine-cvs mailing list