[dia] Comment on trouble with zlib1.dll



commit 35771b06ef30e669ae450d21137ed77ff8bf5e15
Author: Hans Breuer <hans breuer org>
Date:   Sun Aug 22 16:47:25 2010 +0200

    Comment on trouble with zlib1.dll
    
    If zlib1.dll built with e.g. vc9 is loaded by Dia it may
    silently exit the program with the call to gzdopen().
    Probably this is one of Micro$oft security updates ;)
    It looks like just another c-runtime mix-ups with fatal
    outcome. The file number calculated by g_open() with msvcrt.dll
    can not be valid with msvcr9.dll, but is this a reason to
    exit the program?

 lib/dia_xml.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/lib/dia_xml.c b/lib/dia_xml.c
index 9cef604..c4927dd 100644
--- a/lib/dia_xml.c
+++ b/lib/dia_xml.c
@@ -105,6 +105,10 @@ static const gchar *
 xml_file_check_encoding(const gchar *filename, const gchar *default_enc)
 {
   int fd = g_open (filename, O_RDONLY, 0);
+  /* If the next call exits the program (without any message) check if
+   * you are loading an incompatible version of zlib*.dll, e.g. one
+   * built against a newer version of msvcrt*.dll
+   */
   gzFile zf = gzdopen(fd,"rb");  
   gchar *buf;
   gchar *p,*pmax;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]