bugunrtf - Bugs: bug #54008, parser.c#my_skip skips wrong...

 
 

bug #54008: parser.c#my_skip skips wrong number of bytes

Submitter:  None
Submitted:  Wed 30 May 2018 04:12:15 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 30 May 2018 04:12:15 AM UTC, original submission:  

There is a simple but painful bug in parser.c#my_skip - if a longer than the current buffer is requested, `read_buf_end` is cleared before the seek, causing the parser to seek past the end of the binary data. This is very likely to corrupt further parsing (see attached sample file).

I've attached a patch with a trivial fix.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44240:  unrtf.patch added by None (347B - text/x-patch)
file #44241:  sample.rtf added by None (16KiB - application/rtf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2018-05-30 None Attached File- Added unrtf.patch, #44240
    Attached File- Added sample.rtf, #44241

Back to the top

Powered by Savane 3.12.
Corresponding source code