diff options
Diffstat (limited to 'app-office')
-rw-r--r-- | app-office/koffice/Manifest | 4 | ||||
-rw-r--r-- | app-office/koffice/files/digest-koffice-1.4.1-r1 | 1 | ||||
-rw-r--r-- | app-office/koffice/files/koffice-1.4.1-rtfimport.patch | 325 | ||||
-rw-r--r-- | app-office/koffice/koffice-1.4.1-r1.ebuild | 7 | ||||
-rw-r--r-- | app-office/kword/files/digest-kword-1.4.1-r1 | 1 | ||||
-rw-r--r-- | app-office/kword/files/koffice-1.4.1-rtfimport.patch | 325 | ||||
-rw-r--r-- | app-office/kword/kword-1.4.1-r1.ebuild | 7 |
7 files changed, 13 insertions, 657 deletions
diff --git a/app-office/koffice/Manifest b/app-office/koffice/Manifest index 4c6686d62ff5..b1d1c0d93df7 100644 --- a/app-office/koffice/Manifest +++ b/app-office/koffice/Manifest @@ -1,4 +1,4 @@ -MD5 21790d04ea9bc0710970c75333847c7f koffice-1.4.1-r1.ebuild 1685 +MD5 254b80eb47879416b76899e98b6a4560 koffice-1.4.1-r1.ebuild 1753 MD5 02039d51ca4a42817775fd436dfaa956 metadata.xml 157 MD5 2e12249c233187695f60e6f177e0baab ChangeLog 15947 MD5 bdcb79a8db04904d6e6c7110e0ff3ec9 koffice-1.3.5-r2.ebuild 1211 @@ -6,7 +6,7 @@ MD5 3ea93db9f2f2175af3c12a4533272623 koffice-1.4.2.ebuild 1542 MD5 216a4ec901dca4c7e574aae8a09c40da koffice-1.4.1.ebuild 1538 MD5 ad0ad852e8525875ef9661ea4cf5546b files/koffice-1.4.1-rtfimport.patch 8794 MD5 79e9d059a9a700c3c8009978d0aa0ce3 files/digest-koffice-1.4.1 68 -MD5 79e9d059a9a700c3c8009978d0aa0ce3 files/digest-koffice-1.4.1-r1 68 +MD5 59512f920182567b8e9420e5e3d1bc9b files/digest-koffice-1.4.1-r1 144 MD5 6ee3768e50296eb2a8158093ee518133 files/CAN-2005-0064.patch 829 MD5 cf5b314fdf4094ea845edfddf2cf39b5 files/digest-koffice-1.4.2 68 MD5 77399be6733ffca4ed1142ab319c1453 files/koffice_1_3_xpdf_buffer_overflow.diff 1808 diff --git a/app-office/koffice/files/digest-koffice-1.4.1-r1 b/app-office/koffice/files/digest-koffice-1.4.1-r1 index 47d9bab5c838..6a96a65f5dd7 100644 --- a/app-office/koffice/files/digest-koffice-1.4.1-r1 +++ b/app-office/koffice/files/digest-koffice-1.4.1-r1 @@ -1 +1,2 @@ MD5 91a7b68757addc5934c5a8209a4926d5 koffice-1.4.1.tar.bz2 19364338 +MD5 9f77b327119fd1db0752dab785e2a975 post-koffice-1.4.1-rtfimport.diff 8614 diff --git a/app-office/koffice/files/koffice-1.4.1-rtfimport.patch b/app-office/koffice/files/koffice-1.4.1-rtfimport.patch deleted file mode 100644 index 1bcf326fe121..000000000000 --- a/app-office/koffice/files/koffice-1.4.1-rtfimport.patch +++ /dev/null @@ -1,325 +0,0 @@ -diff -Nur koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.cpp koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.cpp ---- koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.cpp 2005-07-19 16:09:11.000000000 +0200 -+++ koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.cpp 2005-10-08 10:17:14.000000000 +0200 -@@ -16,7 +16,7 @@ - - RTFTokenizer::RTFTokenizer() - { -- tokenText.resize( 4112 ); -+ tokenText.resize( 4113 ); - fileBuffer.resize( 4096 ); - infile = 0L; - } -@@ -30,8 +30,25 @@ - fileBufferPtr = 0L; - fileBufferEnd = 0L; - infile = in; -+ type = RTFTokenizer::PlainText; - } - -+int RTFTokenizer::nextChar() -+{ -+ if ( fileBufferPtr == fileBufferEnd ) { -+ int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -+ fileBufferPtr = ( uchar* ) fileBuffer.data(); -+ fileBufferEnd = fileBufferPtr; -+ -+ if ( n <= 0 ) -+ return -1; -+ -+ fileBufferEnd = fileBufferPtr + n; -+ } -+ return *fileBufferPtr++; -+} -+ -+ - /** - * Reads the next token. - */ -@@ -42,22 +59,15 @@ - if (!infile) - return; - -- do -- { -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -+ do { -+ int n = nextChar(); - -- if (n <= 0) -- { -- // Return CloseGroup on EOF -- ch = '}'; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -+ if ( n <= 0 ) { -+ ch = '}'; -+ break; -+ } -+ -+ ch = n; - } - while (ch == '\n' || ch == '\r' && ch != 0); - -@@ -67,6 +77,7 @@ - - uchar *_text = (uchar *)text; - -+ - if (ch == '{') - type = RTFTokenizer::OpenGroup; - else if (ch == '}') -@@ -75,20 +86,14 @@ - { - type = RTFTokenizer::ControlWord; - -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -+ int n = nextChar(); - -- if (n <= 0) -- { -- // Return CloseGroup on EOF -- type = RTFTokenizer::CloseGroup; -- return; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -+ if ( n <= 0 ) { -+ // Return CloseGroup on EOF -+ type = RTFTokenizer::CloseGroup; -+ return; -+ } -+ ch = n; - - // Type is either control word or control symbol - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) -@@ -96,64 +101,41 @@ - int v = 0; - - // Read alphabetic string (command) -- while ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) -+ while (_text < ( uchar* )tokenText.data()+tokenText.size()-3 && -+ ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) ) - { - *_text++ = ch; - -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- ch = ' '; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -+ int n = nextChar(); -+ if ( n <= 0 ) { -+ ch = ' '; -+ break; -+ } -+ ch = n; - } - - // Read numeric parameter (param) - bool isneg = (ch == '-'); - -- if (isneg) -- { -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- // Return CloseGroup on EOF -- type = RTFTokenizer::CloseGroup; -- return; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -+ if (isneg) { -+ int n = nextChar(); -+ if ( n <= 0 ) { -+ type = RTFTokenizer::CloseGroup; -+ return; -+ } -+ ch = n; - } -- while (ch >= '0' && ch <= '9') -- { -+ -+ while (ch >= '0' && ch <= '9') { - v = (10 * v) + ch - '0'; - hasParam = true; - -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- ch = ' '; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -- } -+ int n = nextChar(); -+ -+ if ( n <= 0 ) -+ n = ' '; -+ ch = n; -+ } - value = isneg ? -v : v; - - // If delimiter is a space, it's part of the control word -@@ -163,7 +145,7 @@ - } - - *_text = 0; // Just put an end of string for the test, it can then be over-written again -- if ( !qstrncmp( tokenText.data()+1, "bin", 4 ) ) // Test the NULL too to avoid catching keywords starting with "bin" -+ if ( !memcmp( tokenText.data()+1, "bin", 4 ) ) - { // We have \bin, so we need to read the bytes - kdDebug(30515) << "Token:" << tokenText << endl; - if (value > 0) -@@ -173,26 +155,15 @@ - binaryData.resize(value); - for (int i=0; i<value; i++) - { -- if (fileBufferPtr == fileBufferEnd) -- { -- const int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- kdError(30515) << "\\bin stream hit end of file." << endl; -- type = RTFTokenizer::CloseGroup; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -+ int n = nextChar(); -+ if ( n <= 0 ) { -+ type = RTFTokenizer::CloseGroup; -+ break; - } -- binaryData[i]=*fileBufferPtr++; -+ -+ binaryData[i] = n; - } - } -- else -- { -- kdError(30515) << "\\bin with negative value skipping" << endl; -- } - } - - } -@@ -200,19 +171,13 @@ - { - type = RTFTokenizer::ControlWord; - *_text++ = ch; -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); - -- if (n <= 0) -- { -- // Return CloseGroup on EOF -- type = RTFTokenizer::CloseGroup; -- return; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -+ int n = nextChar(); -+ -+ if ( n <= 0 ) { -+ type = RTFTokenizer::CloseGroup; -+ return; -+ } - ch = *fileBufferPtr++; - for(int i=0;i<2;i++) - { -@@ -220,22 +185,16 @@ - value<<=4; - value=value|((ch + ((ch & 16) ? 0 : 9)) & 0xf); - -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- ch = ' '; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -+ int n = nextChar(); -+ -+ if ( n <= 0 ) { -+ ch = ' '; -+ break; -+ } - ch = *fileBufferPtr++; - } -- --fileBufferPtr; -- } -+ --fileBufferPtr; -+ } - else - { - type = RTFTokenizer::ControlWord; -@@ -248,14 +207,16 @@ - - // Everything until next backslash, opener or closer - while ( ch != '\\' && ch != '{' && ch != '}' && ch != '\n' && -- ch != '\r' && fileBufferPtr <= fileBufferEnd ) -+ ch != '\r') - { - *_text++ = ch; -+ if(fileBufferPtr >= fileBufferEnd) -+ break; - ch = *fileBufferPtr++; - } -- -- // Give back last char -- --fileBufferPtr; -+ if(fileBufferPtr < fileBufferEnd) -+ --fileBufferPtr; // give back the last char - } - *_text++ = 0; -+ - } -diff -Nur koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.h koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.h ---- koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.h 2005-07-19 16:09:11.000000000 +0200 -+++ koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.h 2005-10-08 10:17:14.000000000 +0200 -@@ -50,6 +50,8 @@ - - // tokenizer (private) data - private: -+ int nextChar(); -+ - QFile *infile; - QByteArray fileBuffer; - QCString tokenText; diff --git a/app-office/koffice/koffice-1.4.1-r1.ebuild b/app-office/koffice/koffice-1.4.1-r1.ebuild index ea359a075e30..aa9317a588e4 100644 --- a/app-office/koffice/koffice-1.4.1-r1.ebuild +++ b/app-office/koffice/koffice-1.4.1-r1.ebuild @@ -1,12 +1,13 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.4.1-r1.ebuild,v 1.1 2005/10/10 22:06:00 greg_g Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.4.1-r1.ebuild,v 1.2 2005/10/11 14:40:05 greg_g Exp $ inherit kde DESCRIPTION="An integrated office suite for KDE, the K Desktop Environment." HOMEPAGE="http://www.koffice.org/" -SRC_URI="mirror://kde/stable/koffice-${PV}/src/${P}.tar.bz2" +SRC_URI="mirror://kde/stable/koffice-${PV}/src/${P}.tar.bz2 + mirror://kde/security_patches/post-koffice-1.4.1-rtfimport.diff" LICENSE="GPL-2 LGPL-2" SLOT="0" @@ -48,7 +49,7 @@ src_unpack() { kde_src_unpack # Fix RTF import buffer overflow. Applied in 1.4.2. - epatch "${FILESDIR}/koffice-1.4.1-rtfimport.patch" + epatch "${DISTDIR}/post-koffice-1.4.1-rtfimport.diff" } src_compile() { diff --git a/app-office/kword/files/digest-kword-1.4.1-r1 b/app-office/kword/files/digest-kword-1.4.1-r1 index 47d9bab5c838..6a96a65f5dd7 100644 --- a/app-office/kword/files/digest-kword-1.4.1-r1 +++ b/app-office/kword/files/digest-kword-1.4.1-r1 @@ -1 +1,2 @@ MD5 91a7b68757addc5934c5a8209a4926d5 koffice-1.4.1.tar.bz2 19364338 +MD5 9f77b327119fd1db0752dab785e2a975 post-koffice-1.4.1-rtfimport.diff 8614 diff --git a/app-office/kword/files/koffice-1.4.1-rtfimport.patch b/app-office/kword/files/koffice-1.4.1-rtfimport.patch deleted file mode 100644 index 1bcf326fe121..000000000000 --- a/app-office/kword/files/koffice-1.4.1-rtfimport.patch +++ /dev/null @@ -1,325 +0,0 @@ -diff -Nur koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.cpp koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.cpp ---- koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.cpp 2005-07-19 16:09:11.000000000 +0200 -+++ koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.cpp 2005-10-08 10:17:14.000000000 +0200 -@@ -16,7 +16,7 @@ - - RTFTokenizer::RTFTokenizer() - { -- tokenText.resize( 4112 ); -+ tokenText.resize( 4113 ); - fileBuffer.resize( 4096 ); - infile = 0L; - } -@@ -30,8 +30,25 @@ - fileBufferPtr = 0L; - fileBufferEnd = 0L; - infile = in; -+ type = RTFTokenizer::PlainText; - } - -+int RTFTokenizer::nextChar() -+{ -+ if ( fileBufferPtr == fileBufferEnd ) { -+ int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -+ fileBufferPtr = ( uchar* ) fileBuffer.data(); -+ fileBufferEnd = fileBufferPtr; -+ -+ if ( n <= 0 ) -+ return -1; -+ -+ fileBufferEnd = fileBufferPtr + n; -+ } -+ return *fileBufferPtr++; -+} -+ -+ - /** - * Reads the next token. - */ -@@ -42,22 +59,15 @@ - if (!infile) - return; - -- do -- { -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -+ do { -+ int n = nextChar(); - -- if (n <= 0) -- { -- // Return CloseGroup on EOF -- ch = '}'; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -+ if ( n <= 0 ) { -+ ch = '}'; -+ break; -+ } -+ -+ ch = n; - } - while (ch == '\n' || ch == '\r' && ch != 0); - -@@ -67,6 +77,7 @@ - - uchar *_text = (uchar *)text; - -+ - if (ch == '{') - type = RTFTokenizer::OpenGroup; - else if (ch == '}') -@@ -75,20 +86,14 @@ - { - type = RTFTokenizer::ControlWord; - -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -+ int n = nextChar(); - -- if (n <= 0) -- { -- // Return CloseGroup on EOF -- type = RTFTokenizer::CloseGroup; -- return; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -+ if ( n <= 0 ) { -+ // Return CloseGroup on EOF -+ type = RTFTokenizer::CloseGroup; -+ return; -+ } -+ ch = n; - - // Type is either control word or control symbol - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) -@@ -96,64 +101,41 @@ - int v = 0; - - // Read alphabetic string (command) -- while ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) -+ while (_text < ( uchar* )tokenText.data()+tokenText.size()-3 && -+ ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) ) - { - *_text++ = ch; - -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- ch = ' '; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -+ int n = nextChar(); -+ if ( n <= 0 ) { -+ ch = ' '; -+ break; -+ } -+ ch = n; - } - - // Read numeric parameter (param) - bool isneg = (ch == '-'); - -- if (isneg) -- { -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- // Return CloseGroup on EOF -- type = RTFTokenizer::CloseGroup; -- return; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -+ if (isneg) { -+ int n = nextChar(); -+ if ( n <= 0 ) { -+ type = RTFTokenizer::CloseGroup; -+ return; -+ } -+ ch = n; - } -- while (ch >= '0' && ch <= '9') -- { -+ -+ while (ch >= '0' && ch <= '9') { - v = (10 * v) + ch - '0'; - hasParam = true; - -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- ch = ' '; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -- ch = *fileBufferPtr++; -- } -+ int n = nextChar(); -+ -+ if ( n <= 0 ) -+ n = ' '; -+ ch = n; -+ } - value = isneg ? -v : v; - - // If delimiter is a space, it's part of the control word -@@ -163,7 +145,7 @@ - } - - *_text = 0; // Just put an end of string for the test, it can then be over-written again -- if ( !qstrncmp( tokenText.data()+1, "bin", 4 ) ) // Test the NULL too to avoid catching keywords starting with "bin" -+ if ( !memcmp( tokenText.data()+1, "bin", 4 ) ) - { // We have \bin, so we need to read the bytes - kdDebug(30515) << "Token:" << tokenText << endl; - if (value > 0) -@@ -173,26 +155,15 @@ - binaryData.resize(value); - for (int i=0; i<value; i++) - { -- if (fileBufferPtr == fileBufferEnd) -- { -- const int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- kdError(30515) << "\\bin stream hit end of file." << endl; -- type = RTFTokenizer::CloseGroup; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -+ int n = nextChar(); -+ if ( n <= 0 ) { -+ type = RTFTokenizer::CloseGroup; -+ break; - } -- binaryData[i]=*fileBufferPtr++; -+ -+ binaryData[i] = n; - } - } -- else -- { -- kdError(30515) << "\\bin with negative value skipping" << endl; -- } - } - - } -@@ -200,19 +171,13 @@ - { - type = RTFTokenizer::ControlWord; - *_text++ = ch; -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); - -- if (n <= 0) -- { -- // Return CloseGroup on EOF -- type = RTFTokenizer::CloseGroup; -- return; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -+ int n = nextChar(); -+ -+ if ( n <= 0 ) { -+ type = RTFTokenizer::CloseGroup; -+ return; -+ } - ch = *fileBufferPtr++; - for(int i=0;i<2;i++) - { -@@ -220,22 +185,16 @@ - value<<=4; - value=value|((ch + ((ch & 16) ? 0 : 9)) & 0xf); - -- if (fileBufferPtr == fileBufferEnd) -- { -- int n = infile->readBlock( fileBuffer.data(), fileBuffer.size() ); -- -- if (n <= 0) -- { -- ch = ' '; -- break; -- } -- fileBufferPtr = (uchar *)fileBuffer.data(); -- fileBufferEnd = (fileBufferPtr + n); -- } -+ int n = nextChar(); -+ -+ if ( n <= 0 ) { -+ ch = ' '; -+ break; -+ } - ch = *fileBufferPtr++; - } -- --fileBufferPtr; -- } -+ --fileBufferPtr; -+ } - else - { - type = RTFTokenizer::ControlWord; -@@ -248,14 +207,16 @@ - - // Everything until next backslash, opener or closer - while ( ch != '\\' && ch != '{' && ch != '}' && ch != '\n' && -- ch != '\r' && fileBufferPtr <= fileBufferEnd ) -+ ch != '\r') - { - *_text++ = ch; -+ if(fileBufferPtr >= fileBufferEnd) -+ break; - ch = *fileBufferPtr++; - } -- -- // Give back last char -- --fileBufferPtr; -+ if(fileBufferPtr < fileBufferEnd) -+ --fileBufferPtr; // give back the last char - } - *_text++ = 0; -+ - } -diff -Nur koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.h koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.h ---- koffice-1.4.1.orig/filters/kword/rtf/import/rtfimport_tokenizer.h 2005-07-19 16:09:11.000000000 +0200 -+++ koffice-1.4.1/filters/kword/rtf/import/rtfimport_tokenizer.h 2005-10-08 10:17:14.000000000 +0200 -@@ -50,6 +50,8 @@ - - // tokenizer (private) data - private: -+ int nextChar(); -+ - QFile *infile; - QByteArray fileBuffer; - QCString tokenText; diff --git a/app-office/kword/kword-1.4.1-r1.ebuild b/app-office/kword/kword-1.4.1-r1.ebuild index 56edef90b495..16cab8befad0 100644 --- a/app-office/kword/kword-1.4.1-r1.ebuild +++ b/app-office/kword/kword-1.4.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/kword/kword-1.4.1-r1.ebuild,v 1.1 2005/10/10 22:10:08 greg_g Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/kword/kword-1.4.1-r1.ebuild,v 1.2 2005/10/11 14:41:23 greg_g Exp $ KMNAME=koffice MAXKOFFICEVER=${PV} @@ -10,6 +10,9 @@ DESCRIPTION="KOffice word processor." HOMEPAGE="http://www.koffice.org/" LICENSE="GPL-2 LGPL-2" +SRC_URI="${SRC_URI} + mirror://kde/security_patches/post-koffice-1.4.1-rtfimport.diff" + SLOT="0" KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" IUSE="" @@ -48,7 +51,7 @@ src_unpack() { kde-meta_src_unpack unpack # Fix RTF import buffer overflow. Applied in 1.4.2. - epatch "${FILESDIR}/koffice-1.4.1-rtfimport.patch" + epatch "${DISTDIR}/post-koffice-1.4.1-rtfimport.diff" # We need to compile liboofilter first echo "SUBDIRS = liboofilter kword" > $S/filters/Makefile.am |