mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +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);
|
||||
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
|
||||
*(res++) = '.';
|
||||
*(res++) = '0';
|
||||
|
|
|
@ -42,7 +42,6 @@ public:
|
|||
|
||||
protected:
|
||||
TypePtr t;
|
||||
char tmp[256];
|
||||
};
|
||||
|
||||
class StringCatArg : public CatArg {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue