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

Another infinite loop #27

Closed
oddcoder opened this issue May 16, 2017 · 5 comments
Closed

Another infinite loop #27

oddcoder opened this issue May 16, 2017 · 5 comments

Comments

@oddcoder
Copy link

Unfortunately i will not be able to provide help because the problem is within internals of GIF images
first I would like to say that this image is fuzzed JPEG.
hang1

however this is a backtrace for where the hanging occured

──────────────────────────────[ source:src/imagew-gif.c+219 ]────
 215	 	xs = rctx->image_left + xi;
 216	 	ys = rctx->image_top + yi;
 217	 
 218	 	// Make sure the coordinate is within the image, and on the screen.
 219	 	if(yi>=(size_t)rctx->image_height) return; 		  ←  $pc	
 220	 	if(xs>=(size_t)rctx->screen_width) return;
 221	 	if(ys>=(size_t)rctx->screen_height) return;
 222	 
 223	 	// Because of how we de-interlace, it's not obvious whether the Y coordinate
──────────────────────────────────────────────────[ threads ]────
[#0] Id 1, Name: "imagew", stopped, reason: SIGINT
────────────────────────────────────────────────────[ trace ]────
[#0] RetAddr: 0x7ffff7bc6951, Name: iwgif_record_pixel(offset=0x2, coloridx=<optimized out>, rctx=0x60d0e0)
[#1] RetAddr: 0x7ffff7bc6951, Name: lzw_emit_code(rctx=0x60d0e0, d=0x7fffffff7810, first_code=0x18)
[#2] RetAddr: 0x7ffff7bc71e0, Name: lzw_process_code(code=0x18, d=0x7fffffff7810, rctx=0x60d0e0)
[#3] RetAddr: 0x7ffff7bc71e0, Name: lzw_process_bytes(data_size=<optimized out>, data=<optimized out>, d=<optimized out>, rctx=<optimized out>)
[#4] RetAddr: 0x7ffff7bc71e0, Name: iwgif_read_image(rctx=0x60d0e0)
[#5] RetAddr: 0x7ffff7bc7804, Name: iwgif_read_main(rctx=0x60d0e0)
[#6] RetAddr: 0x7ffff7bc7804, Name: iw_read_gif_file(ctx=0x60a840, iodescr=0x7fffffffd9d0)
[#7] RetAddr: 0x7ffff7bc2d7f, Name: iw_read_file_by_fmt(ctx=0x60a840, readdescr=0x7fffffffd9d0, fmt=<optimized out>)
[#8] RetAddr: 0x4052ad, Name: iwcmd_run(p=0x7fffffffdb20)
[#9] RetAddr: 0x4052ad, Name: iwcmd_main(argc=<optimized out>, argv=<optimized out>)

the problem isn't how is it parsed but it is that it lead to infinite loop somehow

jsummers added a commit that referenced this issue May 17, 2017
The bug could cause an infinite loop, and possibly other problems.
Fixes issue #27
@jsummers
Copy link
Owner

Should be fixed by commit a75fd48.

@DomT4
Copy link

DomT4 commented May 24, 2017

@jsummers Are there plans for a release soon given the collection of bugs fixed since 1.3.1, by any chance?

@jsummers
Copy link
Owner

Yes, probably tomorrow.

@DomT4
Copy link

DomT4 commented May 24, 2017

Great, thanks!

@ilovezfs
Copy link

@jsummers yes a new release would be great!

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

No branches or pull requests

4 participants