| Summary: | Calc cell range search crashes open office if range is null | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Anthony Zeeman <spamattractant> |
| Component: | BASIC | Assignee: | Caolán McNamara <caolan.mcnamara> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | erack, h3734236, serval2412 |
| Priority: | medium | Keywords: | haveBacktrace |
| Version: | 5.2.0.0.alpha0+ | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:5.2.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Attachments: |
Calc file with macro demonstrating bug
console bt |
||
Created attachment 123861 [details]
console bt
On pc Debian x86-64 with master sources updated today, I could reproduce this.
I attached a bt with symbols.
Eike: with this straightforward patch,
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 2e262b4..5b9cd4b 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -3974,7 +3974,7 @@ uno::Reference<uno::XInterface> ScCellRangesBase::Find_Impl(
SCTAB nTab;
if (pLastPos)
pLastPos->GetVars( nCol, nRow, nTab );
- else
+ else if (!aRanges.empty())
{
nTab = lcl_FirstTab(aRanges); //! mehrere Tabellen?
ScDocument::GetSearchAndReplaceStart( *pSearchItem, nCol, nRow );
I got no crash but got a popup with this instead:
"Inadmissible value or data type.
Index out of defined range.
"
Is it normal or is the patch wrong or insufficient?
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=80502737b2ac722d4adfd4e89d3dc46799ded97e Resolves: tdf#98895 range search crashes open office if range is null It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Might as well go brute force with an exception I reckon |
Created attachment 123858 [details] Calc file with macro demonstrating bug LibreOffice will crash if a cell range search is attempted on an empty range as returned by "queryContentCells" on a cell range with no data. A sample Calc file with a demonstration macro is attached. Click "Crash" on the toolbar to demonstrate the bug. On a sheet with data, the row number containing the data is returned and displayed in a message box. The search is then done on an empty sheet and LibreOffice will crash.