Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

StringParser.php - expression is always true #716

Closed
AppChecker opened this issue Aug 11, 2016 · 1 comment
Closed

StringParser.php - expression is always true #716

AppChecker opened this issue Aug 11, 2016 · 1 comment

Comments

@AppChecker
Copy link

The expression:

            if (ord($this->data[$this->offset]) != 0x0A || // Line feed
                ord($this->data[$this->offset]) != 0x0d    // Carriage return
               ) 

in function skipComment is always true

if ord($this->data[$this->offset]) is 0x0A -> (ord($this->data[$this->offset]) != 0x0d ) is true -> whole expression is true
if ord($this->data[$this->offset]) is 0x0d -> (ord($this->data[$this->offset]) != 0x0A ) is true -> whole expression is true
if ord($this->data[$this->offset]) is 0x0C (some other value) -> (ord($this->data[$this->offset]) != 0x0A ) is true -> whole expression is true

This possible defect found by AppChecker

@adamlundrigan
Copy link

We are sorry, but ZF1 has reached its End of Life (EOL) so only security-related fixes are currently being accepted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants