Skip to content

Ripped with compression offset" penalty triggers regardless of offset value (false positive when offset = 0) #19

Description

@pintochristophe69-eng

$Log = preg_replace(
"/(Use compression offset\s+:\s+\d+)/i",
"<span class="bad">$1",
$Log, 1, $Count
);
if ($Count) {
$this->account('Ripped with compression offset', false, 0);
}

Explanation:

the regex matches the line Use compression offset : N for any value of N, but only $Count (whether the line is present) is checked — the captured value is never read. As a result, Use compression offset : 0 (offset disabled, the normal case) triggers the same -100 point penalty as an actually active offset.

Repro: an EAC log containing Use compression offset : 0 → analyze output includes "Ripped with compression offset (-100 points)".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions