OSDN Git Service

Use memmove() rather than memcpy() in set_var_from_var(). If this function
authorNeil Conway <neilc@samurai.com>
Wed, 4 Feb 2004 01:11:47 +0000 (01:11 +0000)
committerNeil Conway <neilc@samurai.com>
Wed, 4 Feb 2004 01:11:47 +0000 (01:11 +0000)
commite66fcce67272f5aece55e834b34ed318b67f921b
tree911e8697bcdb32e806ec1d96d6b7b6a714bd69c4
parentd3917186b26bb95641b6c6189c5c23989c41f69d
Use memmove() rather than memcpy() in set_var_from_var(). If this function
is asked to assign a variable to itself, it will result in doing a
memcpy() on an entirely-overlapping memory range, which results in
undefined behavior according to ANSI C. That said, it is unlikely to
actually do anything bad on any sane libc, but this keeps valgrind quiet.
src/backend/utils/adt/numeric.c