all devices regression report - 2017-11-17-04:44:23 - d9c9bea4ecf31e06bcf52d433b632ce0b6b1b239
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20171117124423.282EA20401D1@i7> |
Differences in all devices errors using gs/examples files Previous Revision: f27b751a1662c3ca8ef64c164cf3f9a400dd416b Current Revision: d9c9bea4ecf31e06bcf52d433b632ce0b6b1b239 commit d9c9bea4ecf31e06bcf52d433b632ce0b6b1b239 Author: Robin Watts <[email protected]> AuthorDate: Thu Nov 16 20:37:41 2017 +0000 CommitDate: Fri Nov 17 09:25:33 2017 +0000 Fix buffer overrun in gp_enumerate_files_next. If pattern="*" and patlength = 1, then pathead = 1. When we look for any following subdirectory, the code attempts to look for the next subdirectory name. To do this it starts searching from the byte after the position of the current '/'. Unfortunately, if the string ends at the current wildcard, we don't have a '/', we have a NUL terminator. This means the current code starts looking just after that. In code terms this means the current code accesses at pattern + pathead + 1, without checking pattern[patthead] first. This is a simple fix. We also take this opportunity to simplify a couple of while loop conditions. The extra negation is too much for my tiny brain to cope with. base/gp_unifs.c new errors: errors that went away: errors that are not whitelisted: === ghostpdl/examples/transparency_example.ps === cp50 === === ghostpdl/examples/transparency_example.ps === psdrgb ===