[yast-commit] r38177 - in /trunk/storage: libstorage/src/AppUtil.cc package/yast2-storage.changes
Author: aschnell Date: Tue May 29 16:18:21 2007 New Revision: 38177 URL: http://svn.opensuse.org/viewcvs/yast?rev=38177&view=rev Log: - fixed crash during detection (caused by empty key-value-pair) (bug #278169) Modified: trunk/storage/libstorage/src/AppUtil.cc trunk/storage/package/yast2-storage.changes Modified: trunk/storage/libstorage/src/AppUtil.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.cc?rev=38177&r1=38176&r2=38177&view=diff ============================================================================== --- trunk/storage/libstorage/src/AppUtil.cc (original) +++ trunk/storage/libstorage/src/AppUtil.cc Tue May 29 16:18:21 2007 @@ -347,7 +347,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() ) { @@ -360,7 +362,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: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=38177&r1=38176&r2=38177&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Tue May 29 16:18:21 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue May 29 16:20:34 CEST 2007 - aschnell@suse.de + +- fixed crash during detection (caused by empty key-value-pair) + (bug #278169) + +------------------------------------------------------------------- Fri May 25 13:30:04 CEST 2007 - jsrain@suse.cz - removed outdated translations from .desktop-files (#271209) @@ -31,7 +37,7 @@ ------------------------------------------------------------------- Mon May 14 11:15:42 CEST 2007 - fehr@suse.de -- adapt to new parted version 1.8.7 ("linux-swap(new)" instead of +- adapt to new parted version 1.8.7 ("linux-swap(new)" instead of "linux-swap") - fix wrong crypttab entry for encrypted swap with password (#273572) - prevent bind mounts from confusing mount detection (#271720) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org