Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
tigervnc.141
U_tigervnc-dont-check-inputs-with-assert.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_tigervnc-dont-check-inputs-with-assert.patch of Package tigervnc.141
Index: common/rfb/zrleDecode.h =================================================================== --- common/rfb/zrleDecode.h (revision 5162) +++ common/rfb/zrleDecode.h (revision 5167) @@ -25,9 +25,10 @@ // FILL_RECT - fill a rectangle with a single colour // IMAGE_RECT - draw a rectangle of pixel data from a buffer +#include <stdio.h> #include <rdr/InStream.h> #include <rdr/ZlibInStream.h> -#include <assert.h> +#include <rfb/Exception.h> namespace rfb { @@ -143,7 +144,10 @@ len += b; } while (b == 255); - assert(len <= end - ptr); + if (end - ptr < len) { + fprintf (stderr, "ZRLE decode error\n"); + throw Exception ("ZRLE decode error"); + } #ifdef FAVOUR_FILL_RECT int i = ptr - buf; @@ -193,7 +197,10 @@ len += b; } while (b == 255); - assert(len <= end - ptr); + if (end - ptr < len) { + fprintf (stderr, "ZRLE decode error\n"); + throw Exception ("ZRLE decode error"); + } } index &= 127;
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