Bug 666949: Segfault when reading XCF file

use a guint for Tile's share_count member
This commit is contained in:
Massimo Valentini
2012-01-22 17:58:50 +01:00
parent 005b119f1f
commit c3c348e50b
3 changed files with 3 additions and 3 deletions

View File

@ -236,7 +236,7 @@ tile_manager_get (TileManager *tm,
#ifdef DEBUG_TILE_MANAGER #ifdef DEBUG_TILE_MANAGER
if (G_UNLIKELY (tile->share_count && tile->write_count)) if (G_UNLIKELY (tile->share_count && tile->write_count))
g_printerr (">> MEEPITY %d,%d <<\n", tile->share_count, tile->write_count); g_printerr (">> MEEPITY %u,%d <<\n", tile->share_count, tile->write_count);
#endif #endif
if (wantread) if (wantread)

View File

@ -47,7 +47,7 @@ struct _Tile
*/ */
gshort write_count; /* write count: number of references that are gshort write_count; /* write count: number of references that are
for write access */ for write access */
gshort share_count; /* share count: number of tile managers that guint share_count; /* share count: number of tile managers that
hold this tile */ hold this tile */
guint dirty : 1; /* is the tile dirty? has it been modified? */ guint dirty : 1; /* is the tile dirty? has it been modified? */
guint valid : 1; /* is the tile valid? */ guint valid : 1; /* is the tile valid? */

View File

@ -294,7 +294,7 @@ tile_detach (Tile *tile,
TileLink *tmp; TileLink *tmp;
#ifdef TILE_DEBUG #ifdef TILE_DEBUG
g_printerr ("tile_detach: %p ~> (%p,%d) r%d *%d\n", g_printerr ("tile_detach: %p ~> (%p,%d) r%d *%u\n",
tile, tm, tile_num, tile->ref_count, tile->share_count); tile, tm, tile_num, tile->ref_count, tile->share_count);
#endif #endif