| Summary: | recognition of TeX and LaTeX files needs an improvement | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Milos Malik <mmalik> | ||||
| Component: | file | Assignee: | Jan Kaluža <jkaluza> | ||||
| Status: | CLOSED ERRATA | QA Contact: | BaseOS QE Security Team <qe-baseos-security> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 6.1 | CC: | ksrot, ovasik, pkovar | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | file-5.04-8.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Prior to this update, file patterns for LaTeX checked only the first 400 bytes of a file to determine the pattern type. This caused an incorrect pattern type recognition as some files could have contained a larger number of comments at the beginning of the file. Furthermore, file patterns which matched a Python script were tried before the LaTex patterns and this undesired behavior could have caused an incorrect pattern type recognition as LaTex files could have included a source code written in Python. With this update, the aforementioned problems have been fixed by increasing the number of first bytes checked for a LaTex file to 4096 bytes, and by trying the LaTex patterns before the Python patterns.
|
Story Points: | --- | ||||
| Clone Of: | |||||||
| : | 676543 826898 (view as bug list) | Environment: | |||||
| Last Closed: | 2011-07-13 08:48:58 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Bug Depends On: | |||||||
| Bug Blocks: | 676543, 826898 | ||||||
| Attachments: |
|
||||||
|
Description
Milos Malik
2011-02-07 11:11:10 UTC
There are 2 problems: 1. File patterns for LaTeX check only first 400 bytes of file to determine its type and some of those files have long comment in the beginning, I will increase that limit. 2. Patterns which match Python script are tried before Latex which is bad in case there's python code in latex. I'll send patch to upstream mailing list and then attach it here. Created attachment 477581 [details]
proposed patch
Check 4096 bytes from TeX file instead of 400 bytes. Increate strength of TeX patterns to beat Python, because it's more usual to have Python in LaTeX than LaTeX in Python.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Prior to this update, file patterns for LaTeX checked only the first 400 bytes of a file to determine the pattern type. This caused an incorrect pattern type recognition as some files could have contained a larger number of comments at the beginning of the file. Furthermore, file patterns which matched a Python script were tried before the LaTex patterns and this undesired behavior could have caused an incorrect pattern type recognition as LaTex files could have included a source code written in Python. With this update, the aforementioned problems have been fixed by increasing the number of first bytes checked for a LaTex file to 4096 bytes, and by trying the LaTex patterns before the Python patterns.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0934.html |