[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 5 commits - hunspell/hunspell-1.3.2-overflow.patch hunspell/makefile.mk mythes/makefile.mk mythes/mythes-1.2.0-overflow.patch neon/makefile.mk neon/neon_ne_set_request_flag.patch redland/raptor xpdf/makefile.mk xpdf/xpdf-3.02-gfxColorMaxComps.patch

Petr Mladek pmladek at kemper.freedesktop.org
Tue Jul 31 07:25:18 PDT 2012


 hunspell/hunspell-1.3.2-overflow.patch   |   91 +++++++++++++++++++++++++++++++
 hunspell/makefile.mk                     |    1 
 mythes/makefile.mk                       |    1 
 mythes/mythes-1.2.0-overflow.patch       |   24 ++++++++
 neon/makefile.mk                         |    2 
 neon/neon_ne_set_request_flag.patch      |   11 +++
 redland/raptor/makefile.mk               |    1 
 redland/raptor/raptor-1.4.18.patch.fixes |   42 ++++++++++++++
 xpdf/makefile.mk                         |    2 
 xpdf/xpdf-3.02-gfxColorMaxComps.patch    |   24 ++++++++
 10 files changed, 197 insertions(+), 2 deletions(-)

New commits:
commit f2cf95b62a35ba2a9f77edd79537189eace6515b
Author: Michael Stahl <mst at openoffice.org>
Date:   Tue Jul 31 16:03:31 2012 +0200

    xpdf: fix some warnings
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/xpdf/makefile.mk b/xpdf/makefile.mk
index 85c2a88..079d5fa 100644
--- a/xpdf/makefile.mk
+++ b/xpdf/makefile.mk
@@ -48,7 +48,7 @@ dummy:
 
 TARFILE_NAME=xpdf-3.02
 TARFILE_MD5=599dc4cc65a07ee868cf92a667a913d2
-PATCH_FILES=$(TARFILE_NAME).patch xpdf-3.02-ooopwd.patch
+PATCH_FILES=$(TARFILE_NAME).patch xpdf-3.02-ooopwd.patch xpdf-3.02-gfxColorMaxComps.patch
 
 CONFIGURE_DIR=
 BUILD_DIR=$(CONFIGURE_DIR)
diff --git a/xpdf/xpdf-3.02-gfxColorMaxComps.patch b/xpdf/xpdf-3.02-gfxColorMaxComps.patch
new file mode 100644
index 0000000..3f0870b
--- /dev/null
+++ b/xpdf/xpdf-3.02-gfxColorMaxComps.patch
@@ -0,0 +1,24 @@
+--- misc/xpdf-3.02/xpdf/GfxState.cc	2007-02-27 23:05:52.000000000 +0100
++++ misc/build/xpdf-3.02/xpdf/GfxState.cc	2011-05-18 20:08:45.003807128 +0200
+@@ -2678,7 +2678,7 @@
+   double x[16], y[16];
+   Guint xi, yi;
+   GfxColorComp c[4][gfxColorMaxComps];
+-  Guint ci[4];
++  Guint ci[gfxColorMaxComps];
+   GfxShadingBitBuf *bitBuf;
+   Object obj1, obj2;
+   int i, j;
+--- misc/xpdf-3.02/xpdf/GfxState.h	2007-02-27 23:05:52.000000000 +0100
++++ misc/build/xpdf-3.02/xpdf/GfxState.h	2011-05-18 20:13:26.973936566 +0200
+@@ -393,8 +393,8 @@
+ 
+   int nComps;			// number of color components (1, 3, or 4)
+   GfxColorSpace *alt;		// alternate color space
+-  double rangeMin[4];		// min values for each component
+-  double rangeMax[4];		// max values for each component
++  double rangeMin[gfxColorMaxComps];	// min values for each component
++  double rangeMax[gfxColorMaxComps];	// max values for each component
+   Ref iccProfileStream;		// the ICC profile
+ };
+ 
commit 83265ed949d918514d3791791e5d96873c3fd009
Author: Michael Stahl <mst at openoffice.org>
Date:   Tue Jul 31 16:03:26 2012 +0200

    redland: fix some warnings in raptor
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/redland/raptor/makefile.mk b/redland/raptor/makefile.mk
index f214191..01453f8 100644
--- a/redland/raptor/makefile.mk
+++ b/redland/raptor/makefile.mk
@@ -57,6 +57,7 @@ OOO_PATCH_FILES= \
     $(TARFILE_NAME).patch.ooo_build \
     $(TARFILE_NAME).patch.dmake \
     $(TARFILE_NAME).patch.win32 \
+    $(TARFILE_NAME).patch.fixes \
     $(TARFILE_NAME).patch.rindex \
     raptor-aix.patch \
     $(TARFILE_NAME).entities.patch
diff --git a/redland/raptor/raptor-1.4.18.patch.fixes b/redland/raptor/raptor-1.4.18.patch.fixes
new file mode 100644
index 0000000..7b7c959
--- /dev/null
+++ b/redland/raptor/raptor-1.4.18.patch.fixes
@@ -0,0 +1,42 @@
+--- misc/raptor-1.4.18/src/raptor_abbrev.c	2008-06-15 09:34:06.000000000 +0200
++++ misc/build/raptor-1.4.18/src/raptor_abbrev.c	2011-05-18 18:58:35.440435467 +0200
+@@ -124,6 +124,7 @@
+         case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: 
+         default:
+           RAPTOR_FREE(raptor_abbrev_node, node);
++          node = NULL;
+     }
+     
+   }
+--- misc/raptor-1.4.18/src/raptor_parse.c	2008-06-15 09:18:50.000000000 +0200
++++ misc/build/raptor-1.4.18/src/raptor_parse.c	2011-05-18 18:58:32.143702301 +0200
+@@ -1870,7 +1870,7 @@
+         ((char*)buffer)[FIRSTN]=c;
+     }
+ 
+-    if(i > MAX_PARSERS) {
++    if(i >= MAX_PARSERS) {
+       raptor_finish();
+       RAPTOR_FATAL2("Number of parsers greater than static buffer size %d\n",
+                     MAX_PARSERS);
+--- misc/raptor-1.4.18/src/raptor_rdfxml.c	2008-06-15 10:12:06.000000000 +0200
++++ misc/build/raptor-1.4.18/src/raptor_rdfxml.c	2011-05-18 18:58:30.031671100 +0200
+@@ -404,7 +404,7 @@
+ static const char *
+ raptor_rdfxml_element_content_type_as_string(raptor_rdfxml_element_content_type type) 
+ {
+-  if(type > RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST)
++  if(type >= RAPTOR_RDFXML_ELEMENT_CONTENT_TYPE_LAST)
+     return "INVALID";
+   return rdf_content_type_info[type].name;
+ }
+--- misc/raptor-1.4.18/src/raptor_serialize_dot.c	2008-06-15 09:34:29.000000000 +0200
++++ misc/build/raptor-1.4.18/src/raptor_serialize_dot.c	2011-05-18 18:58:33.986920218 +0200
+@@ -266,6 +266,7 @@
+       case RAPTOR_IDENTIFIER_TYPE_UNKNOWN: 
+       default:
+         RAPTOR_FREE(raptor_dot_serializer_node, node);
++        node = NULL;
+     }
+     
+   }
commit 98b6e4ff346656d5785bf99e79d48723aff60702
Author: Michael Stahl <mst at openoffice.org>
Date:   Tue Jul 31 16:03:21 2012 +0200

    neon: fix some warnings
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/neon/makefile.mk b/neon/makefile.mk
index c92a849..bf5b302 100644
--- a/neon/makefile.mk
+++ b/neon/makefile.mk
@@ -50,7 +50,7 @@ NEON_NAME=neon-0.29.5
 
 TARFILE_NAME=$(NEON_NAME)
 TARFILE_MD5=ff369e69ef0f0143beb5626164e87ae2
-PATCH_FILES=neon.patch
+PATCH_FILES=neon.patch neon_ne_set_request_flag.patch
 
 .IF "$(GUI)"=="WNT"
     PATCH_FILES+=neon_exports_win.patch
diff --git a/neon/neon_ne_set_request_flag.patch b/neon/neon_ne_set_request_flag.patch
new file mode 100644
index 0000000..162c3bd
--- /dev/null
+++ b/neon/neon_ne_set_request_flag.patch
@@ -0,0 +1,11 @@
+--- misc/neon-0.29.5/src/ne_request.c	2010-09-28 13:57:26.000000000 +0200
++++ misc/build/neon-0.29.5/src/ne_request.c	2011-05-18 12:39:05.134445529 +0200
+@@ -529,7 +529,7 @@
+ 
+ void ne_set_request_flag(ne_request *req, ne_request_flag flag, int value)
+ {
+-    if (flag < NE_SESSFLAG_LAST) {
++    if (flag < NE_REQFLAG_LAST) {
+         req->flags[flag] = value;
+     }
+ }
commit d5a2e5efd3b2e47051121a7bb31c6eb2c29cfeec
Author: Michael Stahl <mst at openoffice.org>
Date:   Tue Jul 31 16:03:16 2012 +0200

    mythes: fix some warnings
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/mythes/makefile.mk b/mythes/makefile.mk
index c663077..305559d 100644
--- a/mythes/makefile.mk
+++ b/mythes/makefile.mk
@@ -43,6 +43,7 @@ ADDITIONAL_FILES += makefile.mk
 
 PATCH_FILES=\
     mythes-1.2.0-vanilla-th-gen-idx.patch \
+    mythes-1.2.0-overflow.patch \
     mythes-1.2.0-makefile-mk.diff \
     mythes-1.2.1-rhbz675806.patch \
     mythes-1.2.0-android.patch
diff --git a/mythes/mythes-1.2.0-overflow.patch b/mythes/mythes-1.2.0-overflow.patch
new file mode 100644
index 0000000..d694337
--- /dev/null
+++ b/mythes/mythes-1.2.0-overflow.patch
@@ -0,0 +1,24 @@
+--- misc/mythes-1.2.0/mythes.cxx	2010-02-27 16:52:52.000000000 +0100
++++ misc/build/mythes-1.2.0/mythes.cxx	2011-05-18 16:22:49.125014204 +0200
+@@ -4,6 +4,8 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ 
++#include <limits>
++
+ #include "mythes.hxx"
+ 
+ // some basic utility routines
+@@ -204,6 +206,12 @@
+          return 0;
+     }          
+     int nmeanings = atoi(buf+np+1);
++    if ((nmeanings < 0) ||
++        ((::std::numeric_limits<size_t>::max() / sizeof(mentry)) < nmeanings))
++    {
++        free(buf);
++        return 0;
++    }
+     *pme = (mentry*) malloc( nmeanings * sizeof(mentry) );
+     if (!(*pme)) {
+         free(buf);
commit ab7c7b89c700bad9a3a87bc5e07a637cc2922bdf
Author: Michael Stahl <mst at openoffice.org>
Date:   Tue Jul 31 16:02:18 2012 +0200

    hunspell: fix warnings
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/hunspell/hunspell-1.3.2-overflow.patch b/hunspell/hunspell-1.3.2-overflow.patch
new file mode 100644
index 0000000..46d4c67
--- /dev/null
+++ b/hunspell/hunspell-1.3.2-overflow.patch
@@ -0,0 +1,91 @@
+--- misc/hunspell-1.3.2/src/hunspell/affixmgr.cxx	2010-02-27 12:59:53.000000000 +0100
++++ misc/build/hunspell-1.3.2/src/hunspell/affixmgr.cxx	2011-05-18 16:29:45.919141893 +0200
+@@ -6,6 +6,8 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ 
++#include <limits>
++
+ #include "affixmgr.hxx"
+ #include "affentry.hxx"
+ #include "langnum.hxx"
+@@ -4000,7 +4002,10 @@
+              case 3: { 
+                        np++;
+                        numents = atoi(piece); 
+-                       if (numents == 0) {
++                       if ((numents <= 0) ||
++                           ((::std::numeric_limits<size_t>::max()
++                                / sizeof(struct affentry)) < numents))
++                       {
+                            char * err = pHMgr->encode_flag(aflag);
+                            if (err) {
+                                 HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n",
+--- misc/hunspell-1.3.2/src/tools/munch.c	2010-02-27 21:49:49.000000000 +0100
++++ misc/build/hunspell-1.3.2/src/tools/munch.c	2011-05-18 15:53:53.427072106 +0200
+@@ -4,6 +4,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -233,10 +233,19 @@
+                     case 1: { achar = *piece; break; }
+                     case 2: { if (*piece == 'Y') ff = XPRODUCT; break; }
+                     case 3: { numents = atoi(piece); 
+-                              ptr = malloc(numents * sizeof(struct affent));
+-                              ptr->achar = achar;
+-                              ptr->xpflg = ff;
+-	                      fprintf(stderr,"parsing %c entries %d\n",achar,numents);
++                              if ((numents < 0) ||
++                                  ((SIZE_MAX/sizeof(struct affent)) < numents))
++                              {
++                                 fprintf(stderr,
++                                     "Error: too many entries: %d\n", numents);
++                                 numents = 0;
++                              } else {
++                                 ptr = malloc(numents * sizeof(struct affent));
++                                 ptr->achar = achar;
++                                 ptr->xpflg = ff;
++                                 fprintf(stderr,"parsing %c entries %d\n",
++                                         achar,numents);
++                              }
+                               break;
+                             }
+ 		    default: break;
+--- misc/hunspell-1.3.2/src/tools/unmunch.c	2010-02-23 15:53:29.000000000 +0100
++++ misc/build/hunspell-1.3.2/src/tools/unmunch.c	2011-05-18 20:53:43.843599726 +0200
+@@ -6,6 +6,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -158,10 +159,19 @@
+                     case 1: { achar = *piece; break; }
+                     case 2: { if (*piece == 'Y') ff = XPRODUCT; break; }
+                     case 3: { numents = atoi(piece); 
+-                              ptr = malloc(numents * sizeof(struct affent));
+-                              ptr->achar = achar;
+-                              ptr->xpflg = ff;
+-	                      fprintf(stderr,"parsing %c entries %d\n",achar,numents);
++                              if ((numents < 0) ||
++                                  ((SIZE_MAX/sizeof(struct affent)) < numents))
++                              {
++                                 fprintf(stderr,
++                                     "Error: too many entries: %d\n", numents);
++                                 numents = 0;
++                              } else {
++                                 ptr = malloc(numents * sizeof(struct affent));
++                                 ptr->achar = achar;
++                                 ptr->xpflg = ff;
++                                 fprintf(stderr,"parsing %c entries %d\n",
++                                         achar,numents);
++                              }
+                               break;
+                             }
+ 		    default: break;
diff --git a/hunspell/makefile.mk b/hunspell/makefile.mk
index 8cf2e4e..46920da 100644
--- a/hunspell/makefile.mk
+++ b/hunspell/makefile.mk
@@ -45,6 +45,7 @@ PATCH_FILES=\
     hunspell-static.patch \
     hunspell-wntconfig.patch \
     hunspell-solaris.patch \
+    hunspell-1.3.2-overflow.patch \
     hunspell-android.patch
 
 .IF "$(GUI)"=="UNX"


More information about the Libreoffice-commits mailing list