aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb_gin.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-05-09 18:24:17 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-05-09 18:24:17 -0400
commit3d8c2b496fc1fed2b8ff8a403d3a17329325466e (patch)
tree920fe41eaaf270a36d7af0af7bf89e9d65176544 /src/backend/utils/adt/jsonb_gin.c
parent0b92a77c17ebe8bec08e250e1a929b07efef1008 (diff)
downloadpostgresql-3d8c2b496fc1fed2b8ff8a403d3a17329325466e.tar.gz
postgresql-3d8c2b496fc1fed2b8ff8a403d3a17329325466e.zip
Fix broken allocation logic in recently-rewritten jsonb_util.c.
reserveFromBuffer() failed to consider the possibility that it needs to more-than-double the current buffer size. Beyond that, it seems likely that we'd someday need to worry about integer overflow of the buffer length variable. Rather than reinvent the logic that's already been debugged in stringinfo.c, let's go back to using that logic. We can still have the same targeted API, but we'll rely on stringinfo.c to manage reallocation. Per report from Alexander Korotkov.
Diffstat (limited to 'src/backend/utils/adt/jsonb_gin.c')
0 files changed, 0 insertions, 0 deletions