summarylogtreecommitdiffstats
path: root/fix_ignored_fread_png_value.patch
diff options
context:
space:
mode:
authorWilken 'Akiko' Gottwalt2020-08-19 18:52:07 +0200
committerWilken 'Akiko' Gottwalt2020-08-19 18:52:07 +0200
commitddc698fb8c0f6e338f0b2629b07f94b5b17ab2de (patch)
treeff1827d000fd8df4db908d3a883800bec01828e7 /fix_ignored_fread_png_value.patch
parentb6e3c2c2cf4f65268e455dd96e4e5bb0e0baf920 (diff)
downloadaur-ddc698fb8c0f6e338f0b2629b07f94b5b17ab2de.tar.gz
Bumped the version to 1.7.4.
- included a fix for a missed out return value, which should be checked (and get rid of a warning in the process) - changed the build process to deal with upcoming cmake changes to out of source tree building
Diffstat (limited to 'fix_ignored_fread_png_value.patch')
-rw-r--r--fix_ignored_fread_png_value.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/fix_ignored_fread_png_value.patch b/fix_ignored_fread_png_value.patch
new file mode 100644
index 000000000000..80d10d761ce9
--- /dev/null
+++ b/fix_ignored_fread_png_value.patch
@@ -0,0 +1,19 @@
+Nope, we do not ignore the fread result, we actually check it like it should
+have been done ...
+---
+diff --no-dereference -urpN a/source/paint/detail/image_png.hpp b/source/paint/detail/image_png.hpp
+--- a/source/paint/detail/image_png.hpp 2020-08-19 18:36:32.888420665 +0200
++++ b/source/paint/detail/image_png.hpp 2020-08-19 18:39:25.116094825 +0200
+@@ -133,10 +133,10 @@ namespace nana
+ bool is_opened = false;
+
+ png_byte png_sig[8];
+- ::fread(png_sig, 1, 8, fp);
++ size_t result = ::fread(png_sig, 1, 8, fp);
+
+ //Test whether the file is a png.
+- if(0 == png_sig_cmp(png_sig, 0, 8))
++ if((8 == result) && (0 == png_sig_cmp(png_sig, 0, 8)))
+ {
+ png_structp png_ptr = ::png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
+ if(png_ptr)