opnsense-ports/graphics/Coin/files/patch-hg-11629.diff
Franco Fichtner d9c0666d6d */*: sync with upstream
Taken from: HardenedBSD
2018-06-18 08:28:10 +02:00

27 lines
704 B
Diff

NUL-terminate the string, instead of accidentally setting the
pointer to NULL (which fails to compile on 12-CURRENT due to
converting char to pointer).
From upstream revision 11629.
diff -r fbd6ca1c1436 -r 6008c4bd6ba6 src/3ds/SoStream.cpp
--- src/3ds/SoStream.cpp Wed Aug 30 13:05:43 2017 +0200
+++ src/3ds/SoStream.cpp Wed Aug 30 13:06:50 2017 +0200
@@ -185,7 +185,7 @@
if (!gotNum) { setBadBit(); return FALSE; } \
\
char *ce; \
- s = '\0'; \
+ *s = '\0'; \
_convertType_ tempVal = _convertFunc_(buf, &ce, 0); \
\
if (ce != s) \
@@ -282,7 +282,7 @@
gotAll: \
\
char *ce; \
- s = '\0'; \
+ *s = '\0'; \
double tempVal = _convertFunc_(buf, &ce); \
\
if (ce != s) \