mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
fixed access to uninitialized memory in ZAM's "cat" built-in
This commit is contained in:
parent
a3a0155825
commit
6c2b2819c7
2 changed files with 1 additions and 2 deletions
|
@ -72,7 +72,7 @@ void FixedCatArg::RenderInto(const ZVal& z, char*& res) {
|
||||||
n = modp_dtoa2(d, res, 6);
|
n = modp_dtoa2(d, res, 6);
|
||||||
res += n;
|
res += n;
|
||||||
|
|
||||||
if ( util::approx_equal(d, nearbyint(d), 1e-9) && std::isfinite(d) && ! strchr(tmp, 'e') ) {
|
if ( util::approx_equal(d, nearbyint(d), 1e-9) && std::isfinite(d) ) {
|
||||||
// disambiguate from integer
|
// disambiguate from integer
|
||||||
*(res++) = '.';
|
*(res++) = '.';
|
||||||
*(res++) = '0';
|
*(res++) = '0';
|
||||||
|
|
|
@ -42,7 +42,6 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TypePtr t;
|
TypePtr t;
|
||||||
char tmp[256];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class StringCatArg : public CatArg {
|
class StringCatArg : public CatArg {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue