Skip to content

Commit

Permalink
We want all bytes until null, not all bytes while null. Fixes simplep…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsnedders committed Jun 19, 2009
1 parent ca203f7 commit 4eb8548
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simplepie.inc
Expand Up @@ -8490,7 +8490,7 @@ class SimplePie_gzdecode
if ($this->flags & 8)
{
// Get the length of the filename
$len = strspn($this->compressed_data, "\x00", $this->position);
$len = strcspn($this->compressed_data, "\x00", $this->position);

// Check the length of the string is still valid
$this->min_compressed_size += $len + 1;
Expand All @@ -8510,7 +8510,7 @@ class SimplePie_gzdecode
if ($this->flags & 16)
{
// Get the length of the comment
$len = strspn($this->compressed_data, "\x00", $this->position);
$len = strcspn($this->compressed_data, "\x00", $this->position);

// Check the length of the string is still valid
$this->min_compressed_size += $len + 1;
Expand Down

0 comments on commit 4eb8548

Please sign in to comment.