Problem/Motivation

I just came across an endless-loop in advagg_parse_media_blocks().
Cause was a broken CSS file (something went wrong on git merge).
This lead to a missing closing bracket and thus to an endless loop and tons of following errors: "Uninitialized string offset: 1423241646 in advagg.missing.inc on line 1007"
Within no time I had a >2GB php error log file.

Proposed resolution

Change this loop while (!empty($s)) { to this while (!empty($s) && isset($css[$i])) { that way we recognize "EOF" and don't overflow.

Remaining tasks

Reviews needed.

User interface changes

None

API changes

None

Data model changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Will go in after #2522738: Combine CSS files by using media queries breaks CSS is committed

mikeytown2’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.