Fix #16986: file_download.php adds buffer trash to file contents
Fix #16989: The bug_get_bugnote_count() function in the bug API always returns 0
Merge pull request #30 from mantisbt/master

master updates