Re: segfault in version_compare

From: Date: Tue, 21 May 2002 07:39:52 +0000
Subject: Re: segfault in version_compare
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-84221@lists.php.net to get a copy of this message
On Tue, 2002-05-21 at 07:45, Rasmus Lerdorf wrote: > Stig, I was going to fix this, but then I saw your code... > > So here you go. "pear install XML_RSS" ends up causing this call: > > version_compare('', '1.0', 'ge'); > > This tosses php_version_compare() into an infinite recursive loop > eventually ending in a segfault. Now, why exactly php_version_compare() > needs to be a recursive function is a bit beyond me and hence the handoff. It's recursive because it uses the same "algorithm" to compare each element in the version number. Implementing that as a loop is even uglier IMHO. Will fix the bug. - Stig

« previous php.dev (#84221) next »