bugGNU Enscript - Bugs: bug #38998, get_next_token() crash


bug #38998: get_next_token() crash

Submitter:  Tim Waugh <twaugh>
Submitted:  Wed 15 May 2013 01:56:36 PM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Wed 15 May 2013 01:56:36 PM UTC, original submission:  

There is insufficient bounds checking in the get_next_token() function in psgen.c.

1931       else if (bufpos - 2 > w
1932        && ISOCTAL (buffer[bufpos])
1933        && ISOCTAL (buffer[bufpos - 1])
1934        && ISOCTAL (buffer[bufpos - 2])
1935        && buffer[bufpos - 3] == '\\')

bufpos is an unsigned int, but w is an int.  If bufpos < 2, this comparison evaluates as true.

Tim Waugh <twaugh>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #28087:  enscript-bufpos-crash.patch added by twaugh (571B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by twaugh (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-15 twaugh Attached File- Added enscript-bufpos-crash.patch, #28087

    Back to the top

    Powered by Savane 3.9