[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/filters/libmsooxml
From:       Carlos Licea <carlos_licea () hotmail ! com>
Date:       2010-09-20 19:32:50
Message-ID: 20100920193250.C2266AC888 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1177634 by clicea:

Finally solve stack corruptions we got with the filters!

We needed to remove include guards from the "special headers," they
are not meant to be protected from being included more than once, otherwise
we will confuse the compiler getting wrong offsets, therefore corrupting
the stack.

 M  +2 -3      MsooXmlCommonReaderDrawingMLMethods.h  
 M  +2 -4      MsooXmlCommonReaderMethods.h  


--- trunk/koffice/filters/libmsooxml/MsooXmlCommonReaderDrawingMLMethods.h #1177633:1177634
@@ -21,8 +21,8 @@
  *
  */
 
-#ifndef MSOOXMLCOMMONREADERDRAWINGMLMETHODS_H
-#define MSOOXMLCOMMONREADERDRAWINGMLMETHODS_H
+// This is not a normail heder, *don't* add include guards to it.
+// This will cause the compiler to get wrong offsets and to corrupt the stack.
 
 // included by DocxXmlDocumentReader
 
@@ -260,4 +260,3 @@
 bool    m_hyperLink;
 QString m_hyperLinkTarget;
 
-#endif
--- trunk/koffice/filters/libmsooxml/MsooXmlCommonReaderMethods.h #1177633:1177634
@@ -21,8 +21,8 @@
  *
  */
 
-#ifndef MSOOXMLCOMMONREADERMETHODS_H
-#define MSOOXMLCOMMONREADERMETHODS_H
+// This is not a normail heder, *don't* add include guards to it.
+// This will cause the compiler to get wrong offsets and to corrupt the stack.
 
 // included by DocxXmlDocumentReader and PptxXmlSlideReader
 
@@ -48,5 +48,3 @@
 bool m_insideHdr; //!< used to indicate that we're parsing inside hdr (header)
 //! @todo set it
 bool m_insideFtr; //!< used to indicate that we're parsing inside ftr (footer)
-
-#endif
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic