Comments (7)
@robUx4 I've pushed two fixes today, one for a compiler warning with recent versions of gcc/clang, and one for a potential buffer overflow. I'd like to release the next libEBML soon, ideally this weekend. However, I'd also like to give you enough time to check today's changes. Can you please do that & get back to me? Thanks.
from libebml.
OK will try to test curent master today.
If may I ask you for yet another thing small :)
It would be really niice if you would consider change current tagging convention. Current is used release-<version>
which is causeing that autogenerated from git tag tar ball has base ditectorey name libebml-release-1.3.10
. It would be good if you will change that pattern to just <version>
. Simple git automatically adds to base directory name repo name :)
Just please have look on content of https://github.com/Matroska-Org/libebml/archive/release-1.3.10.tar.gz
from libebml.
Github is not the official download site for libEBML & libMatroska downloads. That's https://dl.matroska.org Unfortunately you cannot turn off that Github offers you to download source tarballs for tags. It's not likely that I'll change the tagging scheme.
from libebml.
Just sucessfully been able build my own package with all currebt git patches:
[tkloczko@barrel SPECS]$ rpmbuild -ba libebml.spec
warning: Downloading https://github.com/Matroska-Org/libebml//commit/38592cff.patch#/libebml-EbmlBinary-don-t-do-I-O-with-a-size-of-0.patch to /home/tkloczko/rpmbuild/SOURCES/libebml-EbmlBinary-don-t-do-I-O-with-a-size-of-0.patch
warning: Downloading https://github.com/Matroska-Org/libebml//commit/74753f22.patch#/libebml-warning-fix-for-57.patch to /home/tkloczko/rpmbuild/SOURCES/libebml-warning-fix-for-57.patch
warning: Downloading https://github.com/Matroska-Org/libebml//commit/a66778a6.patch#/libebml-libebml-add-patch-for-type-definitions-for-Haiku.patch to /home/tkloczko/rpmbuild/SOURCES/libebml-libebml-add-patch-for-type-definitions-for-Haiku.patch
warning: Downloading https://github.com/Matroska-Org/libebml//commit/fd8d1765.patch#/libebml-EbmlCrc32-add-explicit-assignment-operator.patch to /home/tkloczko/rpmbuild/SOURCES/libebml-EbmlCrc32-add-explicit-assignment-operator.patch
warning: Downloading https://github.com/Matroska-Org/libebml//commit/654f5970.patch#/libebml-update-ChangeLog.patch to /home/tkloczko/rpmbuild/SOURCES/libebml-update-ChangeLog.patch
warning: Downloading https://github.com/Matroska-Org/libebml//commit/f2fa3769.patch#/libebml-EbmlElement-FindNextElement-fix-buffer-overflow.patch to /home/tkloczko/rpmbuild/SOURCES/libebml-EbmlElement-FindNextElement-fix-buffer-overflow.patch
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.nVtEQi
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ cd /home/tkloczko/rpmbuild/BUILD
+ rm -rf libebml-1.3.10
+ /usr/bin/xz -dc /home/tkloczko/rpmbuild/SOURCES/libebml-1.3.10.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd libebml-1.3.10
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/libebml-use-system-utf8cpp.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/libebml-EbmlBinary-don-t-do-I-O-with-a-size-of-0.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/libebml-warning-fix-for-57.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/libebml-libebml-add-patch-for-type-definitions-for-Haiku.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/libebml-EbmlCrc32-add-explicit-assignment-operator.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/libebml-update-ChangeLog.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/libebml-EbmlElement-FindNextElement-fix-buffer-overflow.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/rm -r src/lib/utf8-cpp
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.SBvQPg
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ cd libebml-1.3.10
+ export 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none'
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none'
+ export 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none'
+ CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none'
+ export 'FFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none'
+ FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none'
+ export 'FCFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none'
+ FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none'
+ export 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin'
+ export AR=/usr/bin/gcc-ar RANLIB=/usr/bin/gcc-ranlib NM=/usr/bin/gcc-nm
+ AR=/usr/bin/gcc-ar
+ RANLIB=/usr/bin/gcc-ranlib
+ NM=/usr/bin/gcc-nm
+ export CC=gcc CXX=g++
+ CC=gcc
+ CXX=g++
+ /usr/bin/cmake -D BUILD_SHARED_LIBS=ON -D CMAKE_AR=/usr/bin/gcc-ar -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_C_FLAGS_RELEASE=-DNDEBUG -D CMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -D CMAKE_Fortran_FLAGS_RELEASE=-DNDEBUG -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_NM=/usr/bin/gcc-nm -D CMAKE_RANLIB=/usr/bin/gcc-ranlib -D CMAKE_VERBOSE_MAKEFILE=ON -D INCLUDE_INSTALL_DIR=/usr/include -D LIB_INSTALL_DIR=/usr/lib64 -D LIB_SUFFIX=64 -D SHARE_INSTALL_PREFIX=/usr/share -D SYSCONF_INSTALL_DIR=/etc .
-- The C compiler identification is GNU 10.1.1
-- The CXX compiler identification is GNU 10.1.1
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_Fortran_FLAGS_RELEASE
INCLUDE_INSTALL_DIR
LIB_INSTALL_DIR
LIB_SUFFIX
SHARE_INSTALL_PREFIX
SYSCONF_INSTALL_DIR
-- Build files have been written to: /home/tkloczko/rpmbuild/BUILD/libebml-1.3.10
[..]
Processing files: libebml-1.3.10-3.fc33.x86_64
Provides: libebml = 1.3.10-3.fc33 libebml(x86-64) = 1.3.10-3.fc33 libebml.so.4()(64bit)
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3.1)(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libstdc++.so.6(CXXABI_1.3.8)(64bit) libstdc++.so.6(CXXABI_1.3.9)(64bit) libstdc++.so.6(GLIBCXX_3.4)(64bit) libstdc++.so.6(GLIBCXX_3.4.21)(64bit) libstdc++.so.6(GLIBCXX_3.4.26)(64bit) libstdc++.so.6(GLIBCXX_3.4.9)(64bit) rtld(GNU_HASH)
Processing files: libebml-devel-1.3.10-3.fc33.x86_64
Provides: cmake(EBML) = 1.3.10 libebml-devel = 1.3.10-3.fc33 libebml-devel(x86-64) = 1.3.10-3.fc33 pkgconfig(libebml) = 1.3.10
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: libebml.so.4()(64bit)
Processing files: libebml-debugsource-1.3.10-3.fc33.x86_64
Provides: libebml-debugsource = 1.3.10-3.fc33 libebml-debugsource(x86-64) = 1.3.10-3.fc33
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Processing files: libebml-debuginfo-1.3.10-3.fc33.x86_64
Provides: debuginfo(build-id) = 08c9d7848c6370feab0165bdfc194a8de43489df libebml-debuginfo = 1.3.10-3.fc33 libebml-debuginfo(x86-64) = 1.3.10-3.fc33
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Recommends: libebml-debugsource(x86-64) = 1.3.10-3.fc33
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/tkloczko/rpmbuild/BUILDROOT/libebml-1.3.10-3.fc33.x86_64
Wrote: /home/tkloczko/rpmbuild/SRPMS/libebml-1.3.10-3.fc33.src.rpm
Wrote: /home/tkloczko/rpmbuild/RPMS/libebml-devel-1.3.10-3.fc33.x86_64.rpm
Wrote: /home/tkloczko/rpmbuild/RPMS/libebml-1.3.10-3.fc33.x86_64.rpm
Wrote: /home/tkloczko/rpmbuild/RPMS/libebml-debugsource-1.3.10-3.fc33.x86_64.rpm
Wrote: /home/tkloczko/rpmbuild/RPMS/libebml-debuginfo-1.3.10-3.fc33.x86_64.rpm
As you can see I'm using on my own patch:
[tkloczko@barrel SPECS]$ cat /home/tkloczko/rpmbuild/SOURCES/libebml-use-system-utf8cpp.patch
diff -up libebml-1.3.7/src/EbmlUnicodeString.cpp.utf8cpp libebml-1.3.7/src/EbmlUnicodeString.cpp
--- libebml-1.3.7/src/EbmlUnicodeString.cpp.utf8cpp 2019-03-12 20:27:42.000000000 +0100
+++ libebml-1.3.7/src/EbmlUnicodeString.cpp 2019-06-07 22:54:39.002363241 +0200
@@ -39,7 +39,7 @@
#include "ebml/EbmlUnicodeString.h"
-#include "lib/utf8-cpp/source/utf8/checked.h"
+#include <utf8cpp/utf8/checked.h>
START_LIBEBML_NAMESPACE
It would be good to add proper way to use system utf8cpp header files.
Other small issues .. compile time warnings generated gcc 10.1.1:
In file included from /home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/src/Debug.cpp:46:
/home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/ebml/Debug.h:150:27: warning: attributes ignored on elaborated-type-specifier that is not a forward declaration [-Wattributes]
150 | extern class EBML_DLL_API ADbg globalDebug;
| ^~~~
In file included from /home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/src/SafeReadIOCallback.cpp:40:
/home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/ebml/MemReadIOCallback.h:40:20: warning: type attributes ignored after type is already defined [-Wattributes]
40 | class EBML_DLL_API EbmlBinary;
| ^~~~~~~~~~
In file included from /home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/src/SafeReadIOCallback.cpp:41:
/home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/ebml/SafeReadIOCallback.h:43:20: warning: type attributes ignored after type is already defined [-Wattributes]
43 | class EBML_DLL_API IOCallback;
| ^~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/ebml/SafeReadIOCallback.h:44:20: warning: type attributes ignored after type is already defined [-Wattributes]
44 | class EBML_DLL_API EbmlBinary;
| ^~~~~~~~~~
In file included from /home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/src/MemReadIOCallback.cpp:40:
/home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/ebml/MemReadIOCallback.h:40:20: warning: type attributes ignored after type is already defined [-Wattributes]
40 | class EBML_DLL_API EbmlBinary;
| ^~~~~~~~~~
In file included from /home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/src/StdIOCallback.cpp:43:
/home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/ebml/Debug.h:150:27: warning: attributes ignored on elaborated-type-specifier that is not a forward declaration [-Wattributes]
150 | extern class EBML_DLL_API ADbg globalDebug;
| ^~~~
In file included from /home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/src/MemIOCallback.cpp:36:
/home/tkloczko/rpmbuild/BUILD/libebml-1.3.10/ebml/Debug.h:150:27: warning: attributes ignored on elaborated-type-specifier that is not a forward declaration [-Wattributes]
150 | extern class EBML_DLL_API ADbg globalDebug;
| ^~~~
from libebml.
Github is not the official download site for libEBML
That really doesn't matter. If someone want to use on top of the release set of patches added after tagged release like you see I've done using straight rpmnbuild to download and apply all necessary patches using tagged archive guarantees that those patches will be applied without hiccups. I'm 100% that you not been aware that many people are using git and tagged tar balls that way :)
Other thing is that what is in git repo because you are using cmake does not need to use any preparation steps on building your project code :)
In other words autogenerated by git tarball from release tag is 100% usable :)
from libebml.
libEBML v1.4.0 and libMatroska v1.6.0 have just been released. Download them here.
from libebml.
Looks good :)
Only small thing which I see which could be corrected is:
/home/tkloczko/rpmbuild/BUILD/libebml-1.4.0/src/EbmlElement.cpp: In member function 'filepos_t libebml::EbmlElement::OverwriteData(libebml::IOCallback&, bool)':
/home/tkloczko/rpmbuild/BUILD/libebml-1.4.0/src/EbmlElement.cpp:713:8: warning: unused variable 'DataSize' [-Wunused-variable]
713 | auto DataSize = GetSize();
| ^~~~~~~~
Thx
from libebml.
Related Issues (20)
- Validate EbmlId on creation/Don't set the size on creation HOT 3
- Use [[nodiscard]] on some methods HOT 1
- FIx handling of broken UTF-8 data HOT 2
- Add the doctype(s)+version(s) an element is allowed in HOT 2
- run source through clang-format HOT 1
- Switch to C++17 HOT 4
- Handle reading empty elements
- Backport some fixes on 1.x HOT 1
- Stack corruption in EbmlElement.cpp MakeRenderHead() HOT 3
- find_if to find conversions HOT 4
- Move the size information in EbmlCallbacks HOT 2
- Show the CMake configuration at the end of configuration
- Add code coverage in the CI
- Use the EbmlDocVersion constraints when checking/adding mandatory elements
- Handle global elements as a list of EbmlCallbacks
- Use std::optional for element value+value is set
- Make ShouldWrite policy a state of each element
- make the library fully usable without RTTI
- allow reading at the top level with EbmlHead+doctype top elements HOT 1
- Add a Big Endian CI target
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libebml.