[Users] [Bug 3766] Windows: crash on NULL dereference if email has invalid date

noreply at thewildbeast.co.uk noreply at thewildbeast.co.uk
Fri Jan 27 19:36:27 CET 2017


http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3766

--- Comment #2 from Harald van Dijk <cb at gigawatt.nl> ---
Created attachment 1717
  -->
http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1717&action=edit
Handle invalid dates

Sure. I also encountered another issue during testing: I have a few e-mails
where the year in the header is simply given as 11. This should be changed to
2011 on all platforms. I don't see any reason why the if (year < 1000) block
was moved, it doesn't make sense to exclude Windows here, so I moved it back to
where it originally was. Does the attached patch look good?

Tested only on Ubuntu, with the #ifdef changed to forcibly enable this code
path; I haven't set up my Windows machine to be able to compile anything.

And I think g_date_time_add_full cannot return NULL for anything that fits in
an e-mail header, but I didn't want to take chances.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Users mailing list