Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
aab05a94
Kaydet (Commit)
aab05a94
authored
Tem 27, 2012
tarafından
Michael Stahl
Kaydeden (comit)
Michael Stahl
Tem 27, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
hunspell: fix warnings
üst
6a94d7b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
0 deletions
+92
-0
hunspell-1.3.2-overflow.patch
hunspell/hunspell-1.3.2-overflow.patch
+91
-0
makefile.mk
hunspell/makefile.mk
+1
-0
No files found.
hunspell/hunspell-1.3.2-overflow.patch
0 → 100644
Dosyayı görüntüle @
aab05a94
--- 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;
hunspell/makefile.mk
Dosyayı görüntüle @
aab05a94
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment