Author: mlandres Date: Mon Feb 4 19:45:33 2008 New Revision: 8459 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8459&view=rev Log: fix endless loop in str::split Modified: branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h Modified: branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h?rev=8459&r1=8458&r2=8459&view=diff ============================================================================== --- branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h (original) +++ branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h Mon Feb 4 19:45:33 2008 @@ -301,7 +301,7 @@ const char * beg = line_r; const char * cur = beg; // skip leading sepchars - while ( ::strchr( sepchars_r, *cur ) ) + while ( *cur && ::strchr( sepchars_r, *cur ) ) ++cur; unsigned ret = 0; for ( beg = cur; *beg; beg = cur, ++result_r, ++ret ) @@ -312,7 +312,7 @@ // build string *result_r = std::string( beg, cur-beg ); // skip sepchars - while ( cur != beg && ::strchr( sepchars_r, *cur ) ) + while ( *cur && ::strchr( sepchars_r, *cur ) ) ++cur; } return ret; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org