Changeset 35d40f2 in libguac-client-rdp


Ignore:
Timestamp:
04/11/12 00:40:05 (13 months ago)
Author:
zhangmaike
Branches:
master, debian, rpm, unstable
Children:
7c5cf89
Parents:
e63d264
git-author:
Michael Jumper <zhangmaike@…> (04/11/12 00:40:05)
git-committer:
Michael Jumper <zhangmaike@…> (04/11/12 00:40:05)
Message:

Fix boundary overflow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/rdp_glyph.c

    r81b81c3 r35d40f2  
    208208    int stride = cairo_image_surface_get_stride(glyph_surface); 
    209209 
     210    /* Calculate bounds */ 
     211    int max_width = cairo_image_surface_get_width(glyph_surface) - x; 
     212    int max_height = cairo_image_surface_get_height(glyph_surface) - y; 
     213 
     214    /* Ensure dimensions of glyph do not exceed bounds */ 
     215    if (width > max_width) width = max_width; 
     216    if (height > max_height) height = max_height; 
     217 
    210218    /* Ensure data is ready */ 
    211219    cairo_surface_flush(glyph_surface); 
Note: See TracChangeset for help on using the changeset viewer.