not sure why it was apparently working yesterday?

example used:

https://android.googlesource.com/platform/external/libpng/+/aa0ce810a62b165c39abf6252c5fec107716a2fe/example.c
From 2cb59daa35ae3db75fb98a8a5e07ecd14ddeafb0 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <[email protected]>
Date: Wed, 30 Aug 2023 08:01:52 +0300
Subject: [PATCH] More error handling in filepng, sorry!

---
 cinelerra-5.1/cinelerra/filepng.C | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cinelerra-5.1/cinelerra/filepng.C b/cinelerra-5.1/cinelerra/filepng.C
index e79c45d5..f4b09d7d 100644
--- a/cinelerra-5.1/cinelerra/filepng.C
+++ b/cinelerra-5.1/cinelerra/filepng.C
@@ -261,6 +261,11 @@ int FilePNG::read_frame(VFrame *output, VFrame *input)
 	png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
 	if(!png_ptr) return 0;
 	info_ptr = png_create_info_struct(png_ptr);
+	if(!info_ptr) return 0;
+	if (setjmp(png_jmpbuf(png_ptr))) {
+	png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+	return 0;
+	}
 	png_set_read_fn(png_ptr, input, (png_rw_ptr)read_function);
 	png_read_info(png_ptr, info_ptr);
 
-- 
2.35.7

-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to