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


bug #38998: get_next_token() crash

Submitted by:  Tim Waugh <twaugh>
Submitted on:  Wed 15 May 2013 01:56:36 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


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 File(s):

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
  • -unavailable- added by twaugh (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 15 May 2013 01:56:36 PM UTCtwaughAttached File-=>Added enscript-bufpos-crash.patch, #28087

    Back to the top

    Powered by Savane 3.1-cleanup