patchThe FreeType Project - Patches: patch #5909, Increase robustness for failing...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5909: Increase robustness for failing mmap

Submitter:  None
Submitted:  Wed 02 May 2007 11:26:44 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  wl Originator Email:  -email is unavailable-
Open/Closed:  Closed

Fri 04 May 2007 06:13:10 AM UTC, comment #1: 

Applied to the CVS, thanks.

Werner LEMBERG <wl>
Group administrator
Wed 02 May 2007 11:26:44 AM UTC, original submission:  

Hi,

mmap is documented to return -1 on error, however, on some RTOS, it might return 0.

If mmap returns 0, I'm getting crashes later on, so I propose the follwing patch:

freetype/builds/unix/ftsystem.c


@@ -275,7 +275,7 @@
                                           file,
                                           0 );

-    if ( (long)stream->base != -1 )
+    if ( (long)stream->base != -1 && stream->base != NULL )
       stream->close = ft_close_stream_by_munmap;
     else
     {

Anonymous

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wl (Posted a comment)
  •  

    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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-04 wl StatusNone Done
        Assigned toNone wl
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code