console.log('folded...', require('mimelib-noiconv').foldLine('Subject: =?UTF-8?Q?lalalla_[Problem_Type:__=E7=84=A1=E6=AD=A4=E9=A0=85=E7=9B=AE_problem!]?='));
Will exhaust all memory and crash the process.
Here's another sample:
var problem = 'Subject: =?UTF-8?Q?lalalla_[Problem_Type:_=E7=84=A1=E6=AD=A4=E9=A0=85=E7=9B=AE=AE=AE=AE=AE=AE=AE=AE=AE?=';
var folded = require('mimelib-noiconv').foldLine(problem);
It's important to make sure that the fix doesn't eliminate part of the character code here.
I was going to prepare a patch but I'm not sure what the correct behavior would be. I posted a question to stack overflow:
I removed the patch that tried to fold long quoted printable lines. It aint according to the spec (lines cant be longer than 76 chars) but at least it works.
This issue is now fixed, quoted printable lines are no longer than 76 + 2 () bytes