[ 558s] I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
[ 558s] W: OpenJK strict-aliasing-punning /home/abuild/rpmbuild/BUILD/OpenJK-1463085567.ba25e50/codemp/qcommon/net_ip.cpp:181, 189, 333, 334, 618, 619, 646, 647
[ 558s]
[ 558s] I: Statement is overflowing a buffer
[ 558s] E: OpenJK bufferoverflow /home/abuild/rpmbuild/BUILD/OpenJK-1463085567.ba25e50/codemp/qcommon/GenericParser2.cpp:161:34
I have no idea what the strict aliasing warning mean in that cases.
But I think the buffer overflow is because in that line length is never checked if length == 0 because in that case length would be set to 0xFFFFFFFF and the memmove would segfault.
So for me I fixed that by simply add length > 0 && to the if statement.
Some other minor warnings are:
[ 175s] OpenJK.x86_64: I: binary-or-shlib-calls-gethostbyname /usr/lib/openjk/JediAcademy/openjk.x86_64
[ 175s] OpenJK.x86_64: I: binary-or-shlib-calls-gethostbyname /usr/lib/openjk/JediAcademy/openjkded.x86_64
[ 175s] The binary calls gethostbyname(). Please port the code to use getaddrinfo().
When compiling on openSUSE I get this errors:
I have no idea what the strict aliasing warning mean in that cases. But I think the buffer overflow is because in that line length is never checked if length == 0 because in that case length would be set to 0xFFFFFFFF and the memmove would segfault. So for me I fixed that by simply add
length > 0 &&
to the if statement.Some other minor warnings are:
(gethostbyname() is deprecated)