Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit fixes a number of file match bugs: * __filter_file_buf() was passing a length value of one less than the string length to cmpbytes() and as a result Equals and Prefix matches were testing one fewer bytes than required. * ASM_RCMP (used in rcmpbytes()) was decrementing the string indices before testing if they were <1. This resulted in one fewer bytes being tested than required. * ASM_RCMP50 comprisd of 2x ASM_RCMP20 and 1x ASM_RCMP5, totalling 45 iterations of ASM_RCMP, instead of 50. * __filter_file_buf() tested failed postfix matches with a forward string match. This resulted in files that started with the postfix, but didn't end with it, matching when they shouldn't. * cmpbytes() continued to loop to full number of iterations, even when the string length had been exhausted (inefficient). * Added descriptions to cmpbytes() and rcmpbytes() to aid in providing the correct parameters. Signed-off-by: Kevin Sheldrake <[email protected]>
- Loading branch information