This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch vtorriqoi
in repository efl.

View the commit online.

commit 126ff7eae8154f15e5ec0236986d7384b8bb81bf
Author: Vincent Torri <vto...@outlook.fr>
AuthorDate: Fri Sep 29 04:18:17 2023 +0200

    fix possible division by 0
---
 src/modules/evas/image_savers/qoi/evas_image_save_qoi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/evas/image_savers/qoi/evas_image_save_qoi.c b/src/modules/evas/image_savers/qoi/evas_image_save_qoi.c
index 3b5a5ae716..f8fa650c3c 100644
--- a/src/modules/evas/image_savers/qoi/evas_image_save_qoi.c
+++ b/src/modules/evas/image_savers/qoi/evas_image_save_qoi.c
@@ -116,6 +116,9 @@ save_image_qoi(RGBA_Image *im, const char *file, int quality EINA_UNUSED)
    for (px_pos = 0; px_pos < px_len; px_pos += channels, iter +=4)
      {
         px.rgba.a = *(iter + 3);
+        if (px.rgba.a == 0)
+          goto close_f;
+
         px.rgba.b = *(iter + 0) * 255 / px.rgba.a;
         px.rgba.g = *(iter + 1) * 255 / px.rgba.a;
         px.rgba.r = *(iter + 2) * 255 / px.rgba.a;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to