[Libreoffice] [REVIEW] fix for fdo#44442, crash in ScInterpreter::GetDBParam with specific document

2012-01-07 Thread Markus Mohrhard
Hey,

this simple patch fixes a crash while loading the document in
fdo#2. I think the crash is related to the fact that we use an
external range in a place where the range is interpreted as database
range.

I think returning before we try to fetch the database range is the
best thing in this case.

I think it is a simple patch fixing a crash and should be pushed to 3-4.

Regards,
Markus
From 5065c9e2f00400d02681e5ac378d105d626b5ecb Mon Sep 17 00:00:00 2001
From: Markus Mohrhard markus.mohrh...@googlemail.com
Date: Sun, 8 Jan 2012 04:32:06 +0100
Subject: [PATCH] return early on error in ScInterpreter::GetDBParam, fdo#2

---
 sc/source/core/tool/interpr1.cxx |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 8121344..3614896 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6187,6 +6187,9 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool rMissingField )
 SetError( errIllegalParameter );
 }
 
+if (nGlobalError)
+return NULL;
+
 auto_ptrScDBRangeBase pDBRef( PopDBDoubleRef() );
 
 if (nGlobalError || !pDBRef.get())
-- 
1.7.3.4

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [REVIEW] fix for fdo#44442, crash in ScInterpreter::GetDBParam with specific document

2012-01-07 Thread Kohei Yoshida
Hi Markus,

On Sat, Jan 7, 2012 at 10:40 PM, Markus Mohrhard
markus.mohrh...@googlemail.com wrote:

 I think it is a simple patch fixing a crash and should be pushed to 3-4.

Simple and makes sense.  You have my approval.

Kohei
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice