diff options
Diffstat (limited to 'src/backend/utils/adt/geo_ops.c')
-rw-r--r-- | src/backend/utils/adt/geo_ops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index b8cf9a8d065..2cf2f644117 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -1478,6 +1478,8 @@ path_recv(PG_FUNCTION_ARGS) SET_VARSIZE(path, size); path->npts = npts; path->closed = (closed ? 1 : 0); + /* prevent instability in unused pad bytes */ + path->dummy = 0; for (i = 0; i < npts; i++) { @@ -4253,6 +4255,8 @@ path_add(PG_FUNCTION_ARGS) SET_VARSIZE(result, size); result->npts = (p1->npts + p2->npts); result->closed = p1->closed; + /* prevent instability in unused pad bytes */ + result->dummy = 0; for (i = 0; i < p1->npts; i++) { @@ -4486,6 +4490,8 @@ poly_path(PG_FUNCTION_ARGS) SET_VARSIZE(path, size); path->npts = poly->npts; path->closed = TRUE; + /* prevent instability in unused pad bytes */ + path->dummy = 0; for (i = 0; i < poly->npts; i++) { |