summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-01 04:24:45 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-01 04:24:45 -0600
commit85a3c08c0496a22a01ea12aff9fdc959356e8b37 (patch)
treecd66809bd98fbdbaf3ececf4ecb5f6beb8247c85
parent68fe6bbf614756c3371082501a0eace6a285ad5e (diff)
downloadtdelibs-85a3c08c0496a22a01ea12aff9fdc959356e8b37.tar.gz
tdelibs-85a3c08c0496a22a01ea12aff9fdc959356e8b37.zip
Fix potential crash
m---------cmake0
-rw-r--r--kfile-plugins/elf/kfile_elf.cpp18
-rw-r--r--kio/kio/kfileitem.cpp14
-rw-r--r--kio/kio/kurifilter.cpp14
4 files changed, 26 insertions, 20 deletions
diff --git a/cmake b/cmake
-Subproject 6092ca3fd1c345a94e4b634bc1a6370f735bcfd
+Subproject 42b03b0965a9e958b6007b49201b7793d2bd4f6
diff --git a/kfile-plugins/elf/kfile_elf.cpp b/kfile-plugins/elf/kfile_elf.cpp
index f816cdb35..73c30203c 100644
--- a/kfile-plugins/elf/kfile_elf.cpp
+++ b/kfile-plugins/elf/kfile_elf.cpp
@@ -135,15 +135,17 @@ bool KElfPlugin::readInfo( KFileMetaInfo& info, uint what)
{
// Failed to obtain a list of ELF icons
}
- while((entry = get_nexticon(&icons, entry)) != NULL)
- {
- if (iconListing.isEmpty()) {
- iconListing = entry->name;
- }
- else {
- iconListing = iconListing.append("<p>").append(entry->name);
+ else {
+ while((entry = get_nexticon(&icons, entry)) != NULL)
+ {
+ if (iconListing.isEmpty()) {
+ iconListing = entry->name;
+ }
+ else {
+ iconListing = iconListing.append("<p>").append(entry->name);
+ }
+ break;
}
- break;
}
if (iconListing.isEmpty()) {
iconListing = TQString("<i>") + i18n("not set") + TQString("</i>");
diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp
index e74b407be..38e3c0e3c 100644
--- a/kio/kio/kfileitem.cpp
+++ b/kio/kio/kfileitem.cpp
@@ -674,12 +674,14 @@ TQPixmap KFileItem::pixmap( int _size, int _state ) const
{
// Failed to obtain a list of ELF icons
}
- while((entry = get_nexticon(&icons, entry)) != NULL)
- {
- if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") {
- iconresnamefound = 1;
- p = DesktopIcon( entry->name, _size, _state );
- break;
+ else {
+ while((entry = get_nexticon(&icons, entry)) != NULL)
+ {
+ if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") {
+ iconresnamefound = 1;
+ p = DesktopIcon( entry->name, _size, _state );
+ break;
+ }
}
}
diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp
index f6910e6a1..f16e0db7d 100644
--- a/kio/kio/kurifilter.cpp
+++ b/kio/kio/kurifilter.cpp
@@ -222,12 +222,14 @@ TQString KURIFilterData::iconName()
{
// Failed to obtain a list of ELF icons
}
- while((entry = get_nexticon(&icons, entry)) != NULL)
- {
- if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") {
- iconresnamefound = 1;
- m_strIconName = entry->name;
- break;
+ else {
+ while((entry = get_nexticon(&icons, entry)) != NULL)
+ {
+ if (KGlobal::iconLoader()->iconPath(entry->name, 0, true) != "") {
+ iconresnamefound = 1;
+ m_strIconName = entry->name;
+ break;
+ }
}
}