Mailinglist Archive: yast-commit (535 mails)

< Previous Next >
[yast-commit] r41366 - in /branches/SuSE-SLE-10-SP1-Branch/storage: libstorage/src/AppUtil.cc package/yast2-storage.changes
  • From: fehr@xxxxxxxxxxxxxxxx
  • Date: Thu, 11 Oct 2007 11:23:07 -0000
  • Message-id: <20071011112307.59C5B3526E@xxxxxxxxxxxxxxxx>
Author: fehr
Date: Thu Oct 11 13:23:06 2007
New Revision: 41366

URL: http://svn.opensuse.org/viewcvs/yast?rev=41366&view=rev
Log:
fixed crash during detection caused by empty key-value-pair (#278169)

Modified:
    branches/SuSE-SLE-10-SP1-Branch/storage/libstorage/src/AppUtil.cc
    branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes

Modified: branches/SuSE-SLE-10-SP1-Branch/storage/libstorage/src/AppUtil.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/storage/libstorage/src/AppUtil.cc?rev=41366&r1=41365&r2=41366&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/storage/libstorage/src/AppUtil.cc (original)
+++ branches/SuSE-SLE-10-SP1-Branch/storage/libstorage/src/AppUtil.cc Thu Oct 11 13:23:06 2007
@@ -346,7 +346,9 @@
        if( (pos=i->find_first_of( delim ))!=string::npos )
            {
            k = i->substr( 0, pos );
-           v = i->substr( i->find_first_not_of( delim, pos+1 ) );
+           string::size_type pos2 = i->find_first_not_of( delim, pos+1 );
+           if( pos2 != string::npos )
+               v = i->substr( pos2 );
            }
        if( !removeSur.empty() )
            {
@@ -359,7 +361,8 @@
            if( !v.empty() && (pos=v.find_last_of(removeSur))==v.size()-1 )
                v.erase( v.find_last_not_of(removeSur)+1 );
            }
-       ret[k] = v;
+       if( !k.empty() && !v.empty() )
+           ret[k] = v;
        }
     return( ret );
     }

Modified: branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes?rev=41366&r1=41365&r2=41366&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes (original)
+++ branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes Thu Oct 11 13:23:06 2007
@@ -7,6 +7,7 @@
 - correctly compute maximal allowable cylinder (#273286)
 - overwrite newly created md devices as partitions (#266538)
 - handle EVMS over md correctly in GetUsedEvmsDisks (#266538)
+- fixed crash during detection caused by empty key-value-pair (#278169)
 
 -------------------------------------------------------------------
 Mon Oct  8 10:49:37 CEST 2007 - fehr@xxxxxxx

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages