Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault: write_view() with png_tag #14

Open
GoogleCodeExporter opened this issue Mar 22, 2016 · 0 comments
Open

segfault: write_view() with png_tag #14

GoogleCodeExporter opened this issue Mar 22, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

** VERSION INFORMATION
io_new rc2
libpng 1.2.44
debian squeeze

** PROBLEM DESCRIPTION
Given an image with either zero height or width, write_view(...,png_tag()) 
segfaults after printing a libpng warning:

** GDB OUTPUT
libpng warning: Image height is zero in IHDR
libpng error: Invalid IHDR data

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffb9a06700 (LWP 14501)]
0x00000000009c8984 in png_destroy_write_struct ()
(gdb) bt
#0  0x00000000009c8984 in png_destroy_write_struct ()
#1  0x0000000000523381 in ~writer (this=0x7fffb9a03730, __in_chrg=<value 
optimized out>) at 
../../../ext/boost_gil_extensions/boost/gil/extension/io_new/formats/png/write.h
pp:62
#2  0x000000000051f402 in 
boost::gil::write_view<boost::gil::detail::file_stream_device<boost::gil::png_ta
g>, 
boost::gil::image_view<boost::gil::memory_based_2d_locator<boost::gil::memory_ba
sed_step_iterator<boost::gil::planar_pixel_iterator<unsigned char*, 
boost::mpl::vector3<boost::gil::red_t, boost::gil::green_t, boost::gil::blue_t> 
> > > >, boost::gil::png_tag> (device=..., view=..., tag=..., ptr=0x0)
    at ../../../ext/boost_gil_extensions/boost/gil/extension/io_new/detail/write_view.hpp:55
#3  0x000000000051b137 in boost::gil::write_view<_IO_FILE*, 
boost::gil::image_view<boost::gil::memory_based_2d_locator<boost::gil::memory_ba
sed_step_iterator<boost::gil::planar_pixel_iterator<unsigned char*, 
boost::mpl::vector3<boost::gil::red_t, boost::gil::green_t, boost::gil::blue_t> 
> > > >, boost::gil::png_tag> (device=@0x7fffb9a03960, view=..., tag=..., 
ptr=0x0)
    at ../../../ext/boost_gil_extensions/boost/gil/extension/io_new/detail/write_view.hpp:82
...
...

Original issue reported on code.google.com by [email protected] on 1 Mar 2013 at 2:40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant