Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
htmldoc.17458
htmldoc.openSUSE_Backports_SLE-15-SP3_Update-CV...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File htmldoc.openSUSE_Backports_SLE-15-SP3_Update-CVE-2022-24191.patch of Package htmldoc.17458
commit fb0334a51300988e9b83b9870d4063e86002b077 Author: Michael R Sweet <michael.r.sweet@gmail.com> Date: Tue Jan 25 18:11:34 2022 -0500 Fix a potential stack overflow bug with GIF images (Issue #470) diff --git a/htmldoc/image.cxx b/htmldoc/image.cxx index a483784..550b0f9 100644 --- a/htmldoc/image.cxx +++ b/htmldoc/image.cxx @@ -465,7 +465,6 @@ gif_read_lzw(FILE *fp, /* I - File to read from */ { uchar buf[260]; - if (!gif_eof) while (gif_get_block(fp, buf) > 0); @@ -482,17 +481,23 @@ gif_read_lzw(FILE *fp, /* I - File to read from */ while (code >= clear_code) { + if (sp >= (stack + sizeof(stack))) + return (255); + *sp++ = table[1][code]; + if (code == table[0][code]) return (255); code = table[0][code]; } + if (sp >= (stack + sizeof(stack))) + return (255); + *sp++ = firstcode = table[1][code]; - code = max_code; - if (code < 4096) + if ((code = max_code) < 4096) { table[0][code] = oldcode; table[1][code] = firstcode;
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