Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
advagg-possible-endless-loop-with-broken-css.patch | 630 bytes | das-peter | |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedLooks good. Will go in after #2522738: Combine CSS files by using media queries breaks CSS is committed
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commented