From: Sebastian Harl Date: Tue, 23 Oct 2012 11:02:58 +0000 (+0200) Subject: CData: Check both arguments of CData_update() for NULL. X-Git-Url: https://git.tokkee.org/?p=postrr.git;a=commitdiff_plain;h=c6cdb6c16da3eadcbeb1b6ba4fbef8cde23e5751 CData: Check both arguments of CData_update() for NULL. --- diff --git a/src/cdata.c b/src/cdata.c index c4f9340..7ee14e6 100644 --- a/src/cdata.c +++ b/src/cdata.c @@ -366,6 +366,9 @@ cdata_update(PG_FUNCTION_ARGS) if (! data) PG_RETURN_CDATA_P(update); + if (! update) + PG_RETURN_CDATA_P(data); + if ((data->cf != update->cf) && (update->val_num > 1)) ereport(ERROR, ( errcode(ERRCODE_INVALID_PARAMETER_VALUE),