Open freakout42 opened 1 year ago
Do the above changes fix this?
now:
[ 2%] Building CXX object libheif/CMakeFiles/heif.dir/bitstream.cc.o /home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/bitstream.cc: In constructor 'StreamReader_memory::StreamReader_memory(const uint8_t*, size_t, bool)': /home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/bitstream.cc:75:32: warning: conversion from 'int64_t' {aka 'long long int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion] 75 | memcpy(m_owned_data, data, m_length); | ^~~~~~~~ [ 4%] Building CXX object libheif/CMakeFiles/heif.dir/box.cc.o /home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/box.cc: In member function 'virtual Error Box::parse(BitstreamRange&)': /home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/box.cc:374:28: warning: conversion from 'uint64_t' {aka 'long long unsigned int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion] 374 | if (range.prepare_read(content_size)) { | ^~~~~~~~~~~~ /home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/box.cc: In static member function 'static Error Box::read(BitstreamRange&, std::shared_ptr*)': /home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/box.cc:587:67: warning: conversion from 'uint64_t' {aka 'long long unsigned int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion] 587 | auto status = range.wait_for_available_bytes(hdr.get_box_size() - hdr.get_header_size()); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/box.cc:616:27: warning: conversion from 'int64_t' {aka 'long long int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion] 616 | box_size_without_header, | ^~~~~~~~~~~~~~~~~~~~~~~ [ 6%] Building CXX object libheif/CMakeFiles/heif.dir/error.cc.o [ 9%] Building CXX object libheif/CMakeFiles/heif.dir/heif.cc.o [ 11%] Building CXX object libheif/CMakeFiles/heif.dir/context.cc.o [ 13%] Building CXX object libheif/CMakeFiles/heif.dir/file.cc.o /home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/file.cc: In member function 'Error HeifFile::read(const std::shared_ptr &)': /home/axel/p/rpm/BUILD/libheif-1.16.1/libheif/file.cc:99:40: warning: conversion from 'uint64_t' {aka 'long long unsigned int'} to 'size_t' {aka 'unsigned int'} may change value [-Wconversion] 99 | BitstreamRange range(m_input_stream, maxSize); | ^~~~~~~ [ 15%] Building CXX object libheif/CMakeFiles/heif.dir/pixelimage.cc.o
What environment and compiler are you using? I want to reproduce it here.
Hmm - very old environment - you will not invest in setup this: Red Hat Enterprise Linux AS release 3 Taroon glibc-2.3.2-95.33 gcc4 (GCC) 12.2.0 I use this environment to build rpms which run almost everywhere and indeed are very robust against attacks because no exploit is build for this binary - in almost 20 years running a bunch of servers using these rpms I had never a successful attack. I would understand if you refuse to support this - but I think any 32-bit environment will show these warnings.
I see. I thought it may be ARMv7, mobile or old RPi.
Should be (partly?) addressed by https://github.com/strukturag/libheif/commit/66bdcdcdedf5100e04b52a95afd317addd23f2f3