r14082 by jghali - #8488 : crash with Signal 0000011 on document loading Only part of the issue, do some sanity check when loading inline objects
scribus-commit
scribus-commit at lists.scribus.net
Fri Oct 2 00:35:21 CEST 2009
Revision: 14082
Author: jghali
Date: 2009-10-01T22:34:06.340947Z
Commit message: #8488 : crash with Signal 0000011 on document loading
Only part of the issue, do some sanity check when loading inline objects
Changeset:
M /branches/Version135/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M /branches/Version135/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
Diffs:
Index: scribus/plugins/fileloader/scribus13format/scribus13format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus13format/scribus13format.cpp (revision 14081)
+++ scribus/plugins/fileloader/scribus13format/scribus13format.cpp (revision 14082)
@@ -1863,8 +1863,11 @@
int pos = obj->itemText.length();
if (ch == SpecialChars::OBJECT) {
- if (iobj != -1) {
- obj->itemText.insertObject(pos, doc->FrameItems.at(iobj));
+ if (iobj >= 0) {
+ if (iobj < doc->FrameItems.count())
+ obj->itemText.insertObject(pos, doc->FrameItems.at(iobj));
+ else
+ qDebug() << QString("scribus13format: invalid inline frame used in text object : %1").arg(iobj);
}
}
else {
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp (revision 14081)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp (revision 14082)
@@ -1857,8 +1857,11 @@
int pos = obj->itemText.length();
if (ch == SpecialChars::OBJECT) {
- if (iobj != -1) {
- obj->itemText.insertObject(pos, doc->FrameItems.at(iobj));
+ if (iobj >= 0) {
+ if (iobj < doc->FrameItems.count())
+ obj->itemText.insertObject(pos, doc->FrameItems.at(iobj));
+ else
+ qDebug() << QString("scribus134format: invalid inline frame used in text object : %1").arg(iobj);
}
}
else if (ch == SpecialChars::SHYPHEN && pos > 0)
More information about the scribus-commit
mailing list