1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-11 07:22:22 +00:00
freebsd-ports/graphics/ilmbase/files/patch-Imath__ImathFun.cpp
Matthias Andree 1fb0ae7cf9 Security update OpenEXR and ilmbase to 2.2.1.
While here, fix libIlmImfUtil_la_LDFLAGp so that when linking libIlmImfUtil,
the locally built libIlmImf gets precedence over the one in /usr/local,
to permit upgrades in a running system with the older version installed.

This changes the library's SONAME, so bump PORTREVISION of all dependees.

Unfortunately, this looks a bit too intrusive for an MFH to 2017Q4.

Security:	CVE-2017-9110
Security:	CVE-2017-9111
Security:	CVE-2017-9112
Security:	CVE-2017-9113
Security:	CVE-2017-9114
Security:	CVE-2017-9115
Security:	CVE-2017-9116
Security:	803879e9-4195-11e7-9b08-080027ef73ec
2017-12-01 01:58:23 +00:00

45 lines
1.1 KiB
C++

--- Imath/ImathFun.cpp.orig 2017-11-17 23:00:23 UTC
+++ Imath/ImathFun.cpp
@@ -33,6 +33,7 @@
///////////////////////////////////////////////////////////////////////////
+#include <inttypes.h>
#include "ImathFun.h"
IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER
@@ -41,14 +42,14 @@ IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER
float
succf (float f)
{
- union {float f; int i;} u;
+ union {float f; int32_t i;} u;
u.f = f;
if ((u.i & 0x7f800000) == 0x7f800000)
{
// Nan or infinity; don't change value.
}
- else if (u.i == 0x00000000 || u.i == 0x80000000)
+ else if (u.i == (int32_t)0x00000000 || u.i == (int32_t)0x80000000)
{
// Plus or minus zero.
@@ -76,14 +77,14 @@ succf (float f)
float
predf (float f)
{
- union {float f; int i;} u;
+ union {float f; int32_t i;} u;
u.f = f;
if ((u.i & 0x7f800000) == 0x7f800000)
{
// Nan or infinity; don't change value.
}
- else if (u.i == 0x00000000 || u.i == 0x80000000)
+ else if (u.i == (int32_t)0x00000000 || u.i == (int32_t)0x80000000)
{
// Plus or minus zero.