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

Bug#703158: marked as done (unblock: calligra/1:2.4.4-3 (pre-approval))



Your message dated Sun, 17 Mar 2013 00:16:48 +0000
with message-id <1363479408.2662.35.camel@jacala.jungle.funky-badger.org>
and subject line Re: Bug#703158: unblock: calligra/1:2.4.4-3 (pre-approval)
has caused the Debian Bug report #703158,
regarding unblock: calligra/1:2.4.4-3 (pre-approval)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
703158: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703158
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org  
User: release.debian.org@packages.debian.org                     
Usertags: unblock
Severity: normal 

Hi,

I would like to ask if you could unblock a fix for an important crash in calligrasheets, triggered by entering some special characters in formula (like " or !) :
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702824

Upsteam already made a simple patch for it (about 15 lines are modified) :
http://anonscm.debian.org/gitweb/?p=pkg-kde/kde-std/calligra.git;a=blob;f=debian/patches/fix_tokenizing_of_invalid_formulas.patch;h=9b70ec9d075bc84a4de47007ba56a371c1ea165c;hb=85b3f71e7dc4b3c31a8c88cda9c322510fcc5390

You can find the debdiff attached to this email.

Regards,

Adrien Grellier
diff -Nru calligra-2.4.4/debian/changelog calligra-2.4.4/debian/changelog
--- calligra-2.4.4/debian/changelog	2013-02-20 18:48:45.000000000 +0100
+++ calligra-2.4.4/debian/changelog	2013-03-15 17:51:19.000000000 +0100
@@ -1,3 +1,11 @@
+calligra (1:2.4.4-3) UNRELEASED; urgency=low
+
+  * import patch fix_tokenizing_of_invalid_formulas.patch from upstream
+    (Closes: #702824). It prevent a important crash when entering some special
+    characters in formula.
+
+ -- Adrien Grellier <adrien.grellier@laposte.net>  Fri, 15 Mar 2013 17:49:12 +0100
+
 calligra (1:2.4.4-2) unstable; urgency=low
 
   [ Lisandro Damián Nicanor Pérez Meyer ]
diff -Nru calligra-2.4.4/debian/patches/fix_tokenizing_of_invalid_formulas.patch calligra-2.4.4/debian/patches/fix_tokenizing_of_invalid_formulas.patch
--- calligra-2.4.4/debian/patches/fix_tokenizing_of_invalid_formulas.patch	1970-01-01 01:00:00.000000000 +0100
+++ calligra-2.4.4/debian/patches/fix_tokenizing_of_invalid_formulas.patch	2013-03-15 17:51:25.000000000 +0100
@@ -0,0 +1,53 @@
+--- a/sheets/Formula.cpp
++++ b/sheets/Formula.cpp
+@@ -656,7 +656,8 @@
+     tokens.reserve(50);
+ 
+     ++data;
+-    const QChar *start = data;
++    const QChar * const start = data;
++    const QChar * const end = start + expr.length();
+     const QChar *tokenStart = data;
+     const QChar *cellStart = data;
+ 
+@@ -667,9 +668,9 @@
+     QString token(length, QChar());
+     token.reserve(length); // needed to not realloc at the resize at the end
+     QChar * out = token.data();
+-    QChar * outStart = token.data();
+-
+-    while (state != Finish) {
++    QChar * const outStart = token.data();
++
++    while (state != Finish && data < end) {
+         switch (state) {
+         case Start:
+             tokenStart = data;
+@@ -1060,7 +1061,7 @@
+     }
+ 
+     // parse error if any text remains
+-    if (!data->isNull())  {
++    if (data+1 < end)  {
+         tokens.append(Token(Token::Unknown, expr.mid(tokenStart - start), tokenStart - start));
+         parseError = true;
+     }
+
+--- a/sheets/tests/TestFormula.cpp
++++ b/sheets/tests/TestFormula.cpp
+@@ -177,9 +177,13 @@
+     // invalid formulas, can't be parsed correctly
+     CHECK_TOKENIZE("+1.23E", QString());
+ 
++    // incomplete formulas
++    CHECK_TOKENIZE("COMPARE(\"", "xo");
++    CHECK_TOKENIZE("SHEETS(Sheet2!", "");
++
+     // empty parameter
+     CHECK_TOKENIZE("IF(A1;A2;)", "xococoo");
+-    CHECK_TOKENIZE("=OFFSET(Sheet2'!B7;0;0)", "");
++    CHECK_TOKENIZE("OFFSET(Sheet2'!B7;0;0)", "");
+ 
+     // function cascade
+     CHECK_TOKENIZE("SUM(ABS(-1);ABS(-1))", "xoxooiooxooioo");
+
diff -Nru calligra-2.4.4/debian/patches/series calligra-2.4.4/debian/patches/series
--- calligra-2.4.4/debian/patches/series	2013-02-20 17:58:53.000000000 +0100
+++ calligra-2.4.4/debian/patches/series	2013-03-15 17:51:35.000000000 +0100
@@ -1 +1,2 @@
 do_not_link_blas.diff
+fix_tokenizing_of_invalid_formulas.patch

--- End Message ---
--- Begin Message ---
On Sat, 2013-03-16 at 11:07 -0300, Lisandro Damián Nicanor Pérez Meyer
wrote:
> > On Sat 16 Mar 2013 08:26:02 Adam D. Barratt escribió:
> > > On Sat, 2013-03-16 at 11:53 +0100, Adrien wrote:
> > > > I would like to ask if you could unblock a fix for an important crash
> > > > in calligrasheets, triggered by entering some special characters in
> > > > formula (like " or !) :
> > > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702824
> > > 
> > > If the upload were made soon, yes.
[...]
> The upload has just finished.

Unblocked; thanks.

Regards,

Adam

--- End Message ---

Reply to: