Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2
ft2demos
bnc641580_CVE-2010-3311.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bnc641580_CVE-2010-3311.diff of Package ft2demos
Index: freetype-2.3.9/src/base/ftstream.c =================================================================== --- freetype-2.3.9.orig/src/base/ftstream.c +++ freetype-2.3.9/src/base/ftstream.c @@ -70,10 +70,16 @@ { FT_Error error = FT_Err_Ok; + /* note that seeking to the first position after the file is valid */ + if ( pos > stream->size ) + { + FT_ERROR(( "FT_Stream_Seek: invalid i/o; pos = 0x%lx, size = 0x%lx\n", + pos, stream->size )); - stream->pos = pos; + error = FT_Err_Invalid_Stream_Operation; + } - if ( stream->read ) + if ( !error && stream->read ) { if ( stream->read( stream, pos, 0, 0 ) ) { @@ -83,14 +89,9 @@ error = FT_Err_Invalid_Stream_Operation; } } - /* note that seeking to the first position after the file is valid */ - else if ( pos > stream->size ) - { - FT_ERROR(( "FT_Stream_Seek: invalid i/o; pos = 0x%lx, size = 0x%lx\n", - pos, stream->size )); - error = FT_Err_Invalid_Stream_Operation; - } + if ( !error ) + stream->pos = pos; return error; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor