vnc: fix segfault
PATCH 1/1 vnc: fix segfault
Move down cmp_bytes initialization. Must be after vga_hw_update() call, because that one might change the screen depth.
Signed-off-by Gerd Hoffmann <[email protected]>
--- vnc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
vnc.c +2 -1
@@ -701,7 +701,7 @@ static void vnc_update_client(void *opaque)int y;uint8_t *guest_row;uint8_t *server_row; -int cmp_bytes =16 *ds_get_bytes_per_pixel (vs->ds); +int cmp_bytes;uint32_t width_mask[VNC_DIRTY_WORDS ];int n_rectangles;int saved_offset;
@@ -721,6 +721,7 @@ static void vnc_update_client(void *opaque)* Update server dirty map. */ vnc_set_bits (width_mask, (ds_get_width (vs->ds) /16 ),VNC_DIRTY_WORDS ); + cmp_bytes =16 *ds_get_bytes_per_pixel (vs->ds); guest_row = vs->guest.ds->data; server_row = vs->server.ds->data;for (y =0 ; y < vs->guest.ds->height; y++) {
Signature · 1 line
1.6.2.2
Quoted 2 lines · Gerd Hoffmann
Move down
cmp_bytesinitialization. Must be aftervga_hw_update()call, because that one might change the screen depth.
Perfect - vncviewer is now working flawless again.
Quoted 2 lines
Signed-off-by Gerd Hoffmann <[email protected]>
Tested-by Daniel Gollub <[email protected]>
Signature · 8 lines
Daniel Gollub Geschaeftsfuehrer: Ralph Dehner FOSS Developer Unternehmenssitz: Vohburg B1 Systems GmbH Amtsgericht: Ingolstadt Mobil: +49-(0)-160 47 73 970 Handelsregister: HRB 3537 EMail: [email protected] http://www.b1-systems.de Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D