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:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich 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 Files:
   
   
Comment:
   

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)
  •  

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

    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.3