OSDN Git Service

Don't use pnstrdup() to duplicate non-string data area.
authorMasaoFujii <masao.fujii@gmail.com>
Fri, 23 Aug 2019 02:47:45 +0000 (11:47 +0900)
committerMasaoFujii <masao.fujii@gmail.com>
Fri, 23 Aug 2019 02:47:45 +0000 (11:47 +0900)
commit9dd14020d1d97664324c01f6534bcff955524a91
tree8d7c1d8b36fba4f3c41a6ee14a0b205eaf0b6386
parenta741b5c2d5abc7fbc364f59e897523fb99c2da1d
Don't use pnstrdup() to duplicate non-string data area.

Previously pnstrdup() was used to duplicate the cached result of pgs2norm().
This was improper usage because that cached result is not string. This and
the change of pnstrdup() by the commit 82c117cb90 in PostgreSQL caused
pgs2norm() to emit a segmentation fault.

This commit changes pgs2norm() so that it duplicates the cached result by
using the original logic instead of pnstrdup().
ludia_funcs.c