[Uml-devel] [Bug 191890] New: stack overflow crash when importing a specific header file
Ralf Habacker
ralf.habacker at freenet.de
Thu May 7 09:19:07 UTC 2009
https://bugs.kde.org/show_bug.cgi?id=191890
Summary: stack overflow crash when importing a specific header
file
Product: umbrello
Version: unspecified
Platform: MS Windows
OS/Version: MS Windows
Status: UNCONFIRMED
Severity: crash
Priority: NOR
Component: general
AssignedTo: umbrello-devel at kde.org
ReportedBy: ralf.habacker at freenet.de
Version: 2.2.71 (using KDE 4.2.2)
Compiler: msvc 2005
OS: MS Windows
Installed from: MS Windows
when importing the file located at
http://websvn.kde.org/*checkout*/trunk/kdesupport/kdewin32/tools/mt/xml.h?revision=964607
umbrello recurses into UMLObject::getFullyQualifiedName() until a stack
overflow occurs.
The related code snippet is listed below see !!!!
QString UMLObject::getFullyQualifiedName(const QString& separator,
bool includeRoot /* = false */) const
{
QString fqn;
if (m_pUMLPackage) {
bool skipPackage = false;
if (!includeRoot) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
if (umldoc->rootFolderType(m_pUMLPackage) != Uml::N_MODELTYPES ||
m_pUMLPackage == umldoc->getDatatypeFolder())
skipPackage = true;
}
if (!skipPackage) {
QString tempSeparator = separator;
if (tempSeparator.isEmpty())
tempSeparator = UMLApp::app()->activeLanguageScopeSeparator();
!!!! fqn = m_pUMLPackage->getFullyQualifiedName(tempSeparator,
includeRoot);
fqn.append(tempSeparator);
}
}
fqn.append(m_Name);
return fqn;
}
The problem is that there is no exit condition. From my point of view a propper
exit conditions would be to change the line
if (m_pUMLPackage) {
into
if (m_pUMLPackage && m_pUMLPackage != this) {
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the umbrello-devel
mailing list