vips_image_write() could crash if called twice

two writes in a row could trigger a crash in some circumstances, thanks
@dirceupj

see https://github.com/jcupitt/ruby-vips/issues/156
This commit is contained in:
John Cupitt 2018-03-04 15:14:06 +00:00
parent e1cac22176
commit 6cff74b602
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
12/2/18 started 8.6.3
- use pkg-config to find libjpeg, if we can
- better clean of output image in vips_image_write() fixes a crash
writing twice to memory
5/1/18 started 8.6.2
- vips_sink_screen() keeps a ref to the input image ... stops a rare race

View File

@ -2539,7 +2539,7 @@ vips_image_write( VipsImage *image, VipsImage *out )
vips_object_local( out, image );
}
else {
vips__reorder_clear( image );
vips__reorder_clear( out );
vips__link_break_all( out );
}