View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0008595 | Scribus | Language Tools | public | 2009-11-23 09:18 | 2010-01-02 23:40 |
| Reporter | sharkcz | Assigned To | jghali | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.3.5 | ||||
| Fixed in Version | 1.3.3.14svn | ||||
| Summary | 0008595: crash when freeing non-existent hyphenator | ||||
| Description | The problem is in my opinion in the destructor of the Hyphenator class. It calls the hnj_hyphen_free() function unconditionally, but from my understanding of the code it's legal to have a NULL value in the hdict attribute and useAble will be false. Patch is attached. reference: https://bugzilla.redhat.com/show_bug.cgi?id=537677 | ||||
| Tags | No tags attached. | ||||
| Attached Files | 0001-check-hdict-value-before-freeing-the-hyphenator.patch (763 bytes)
From dedea3f94802f0f9d9adef4c48f8061282baf776 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Mon, 23 Nov 2009 10:13:48 +0100
Subject: [PATCH] check hdict value before freeing the hyphenator
---
Scribus/scribus/hyphenator.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Scribus/scribus/hyphenator.cpp b/Scribus/scribus/hyphenator.cpp
index 614db47..4da4467 100644
--- a/Scribus/scribus/hyphenator.cpp
+++ b/Scribus/scribus/hyphenator.cpp
@@ -90,7 +90,8 @@ Hyphenator::Hyphenator(QWidget* parent, ScribusDoc *dok) : QObject( parent ),
Hyphenator::~Hyphenator()
{
- hnj_hyphen_free(hdict);
+ if (hdict)
+ hnj_hyphen_free(hdict);
}
void Hyphenator::NewDict(const QString& name)
--
1.6.3.3
| ||||
| Patch | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-11-23 09:18 | sharkcz | New Issue | |
| 2009-11-23 09:18 | sharkcz | File Added: 0001-check-hdict-value-before-freeing-the-hyphenator.patch | |
| 2009-11-23 20:55 | jghali | Note Added: 0022878 | |
| 2009-11-23 20:55 | jghali | Status | new => resolved |
| 2009-11-23 20:55 | jghali | Fixed in Version | => 1.3.3.14svn |
| 2009-11-23 20:55 | jghali | Resolution | open => fixed |
| 2009-11-23 20:55 | jghali | Assigned To | => jghali |
| 2010-01-02 23:40 | cbradney | Status | resolved => closed |