evas: fix png regression issue
authorShinwoo Kim <cinoo.kim@samsung.com>
Thu, 7 May 2020 03:15:02 +0000 (12:15 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Thu, 7 May 2020 21:25:12 +0000 (06:25 +0900)
commit55e952a911137a37f753d4da7d97af94a4b28fb8
treee1631a2fc70c060923de66f9f78d20196a8b6388
parentb585d78e54bc40c069c112f5d8150afcaf5bc023
evas: fix png regression issue

Summary:
Accidentally commit "382c580 evas: add support for .9.png file to PNG loader."
adding the 9 patch feature with small code refactoring made use of setjmp
incorrectly.

[Problem]
evas_image_load_file_data_png calls _evas_image_load_file_internal_head_png,
and _evas_image_load_file_internal_head_png calls setjmp and returns without
problem. And png_read_row calls longjmp. This causes jumping into a function
which was exited. Problematic png file will be attached.

[Solution]
Save calling environment i.e. call setjmp, after returning from
_evas_image_load_file_internal_head_png.

Test Plan:
Problematic png file
{F3876983}

And example code.
{F3876986}

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11782
src/modules/evas/image_loaders/png/evas_image_load_png.c