mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 13:38:19 +00:00
fixed access to uninitialized memory in ZAM's "cat" built-in
This commit is contained in:
parent
9eb3ada8c8
commit
fabb4023c9
2 changed files with 1 additions and 2 deletions
|
@ -73,7 +73,7 @@ void FixedCatArg::RenderInto(ZVal* zframe, int slot, 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