| Bug#: 168 | Product: i.Scribe/InScribe | Version: v1.90 test1 | Platform: PC |
| OS/Version: Windows XP | Status: RESOLVED | Severity: critical | Priority: P1 |
| Resolution: FIXED | Assigned To: fret@memecode.com | Reported By: bonk@karneval.cz | |
| Component: HTML Plugin | |||
| URL: | |||
| Summary: Preview kill application | |||
| Opened: 2007-10-22 19:51 | |||
| Description: | Opened: 2007-10-22 19:51 |
I have recieved a (bad) mail witch kill an application. I found a problem with preview an email. When I switch off the preview than I can use I.scribe. I can send you folders.mail2 where is only this mail. It is about 8kb in zip file. Bronis
Created an attachment (id=38) [details]
this is file with bug
This is mail2 folder you sent me a week or two ago? I had a look at this and its a very badly formed HTML email with hundreds of <body> tags. The problem is that Scribe is using a recursive algorithm to parse the HTML and it runs out of stack space and crashs. On normal well formed email it doesn't have a problem. I've been reviewing my options on the best way to fix it. The 2 that come to mind are making the algorithm use a heap based structure and not the stack (lots of work) or just detect zillions of nested tags and quit out after a certain depth (easy).
This is fixed for v1.90-test1. I've limited the depth of recursion to 1024 levels. After that it bails out of parsing the HTML. Any document parsed before that point will be displayed.