schplurtz / a2s

DokuWiki asciitosvg plugin
GNU General Public License v2.0
3 stars 1 forks source link

Minor problem - + sign on corners may cause memory running out. #3

Closed Vi4Ever closed 6 years ago

Vi4Ever commented 6 years ago

Coming from Ditaa needed to change the corners from + to . or '

Test case: Intermediate example --> not rendering but ok does not produce the Fatal Error

<a2s>
 .---------------------------.
 |                           |
 +---------------------------'
               |                
</a2s>

Problematic example -> not rendering and giving Fatal Error memory message at php level:

<a2s>
 .---------------------------.
 |                           |
 +-------------+-------------'
               |                
</a2s>

Error : Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in \ASCIIToSVG.php on line 3635

Looking at the line of code and due to the incorrect +-sign an infinite loop is starting which will create objects ... until running out of memory. Assigning more memory to th PHP will not help: Requested memory even stays the same.