summaryrefslogtreecommitdiff
authordrw <drw>2003-03-28 01:27:02 (UTC)
committer drw <drw>2003-03-28 01:27:02 (UTC)
commit9e561f9fdd2bef09d21904aba0a74faa39165c04 (patch) (side-by-side diff)
treee183734520a857a424d7e07c4bf0f0e7a35c90f8
parent79907dc7b9d89717b0d02f51a4094449e28eca6c (diff)
downloadopie-9e561f9fdd2bef09d21904aba0a74faa39165c04.zip
opie-9e561f9fdd2bef09d21904aba0a74faa39165c04.tar.gz
opie-9e561f9fdd2bef09d21904aba0a74faa39165c04.tar.bz2
Fix bug in reading feed's Package file
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/server.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 04f5ab7..06b0863 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -162,18 +162,20 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR
bool newPackage = true;
do
{
in.getline( line, 1000 );
if ( in.eof() )
- continue;
+ break;
k[0] = '\0';
v[0] = '\0';
- sscanf( line, "%[^:]: %[^\n]", k, v );
+ if ( sscanf( line, "%[^:]: %[^\n]", k, v ) < 2 )
+ break;
+
key = k;
value = v;
key = key.stripWhiteSpace();
value = value.stripWhiteSpace();
if ( key == "Package" && newPackage )
{