You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coverity complained about a defect in commit 257836a:
Calling "parsePGArray" without checking return value (as is
done elsewhere 11 out of 13 times).
Fix, and also check for empty strings explicitly (NULL as represented by
PQgetvalue()). That worked correctly before only because parsePGArray()
happens to set *nitems = 0 when it fails on an empty string. Also
convert a sanity check assertion to an error to be more paranoid, and
pgindent a nearby line.
Reported-by: Michael Paquier <michael@paquier.xyz>
fatal("could not parse index collation name array");
18587
+
if (!parsePGArray(inddependcollversions,
18588
+
&inddependcollversionsarray,
18589
+
&ninddependcollversions))
18590
+
fatal("could not parse index collation version array");
18591
+
}
18592
+
18593
+
if (ninddependcollnames != ninddependcollversions)
18594
+
fatal("mismatched number of collation names and versions for index");
18583
18595
18584
18596
if (ninddependcollnames > 0)
18585
18597
appendPQExpBufferStr(buffer,
@@ -18594,7 +18606,7 @@ appendIndexCollationVersion(PQExpBuffer buffer, IndxInfo *indxinfo, int enc,
18594
18606
"UPDATE pg_catalog.pg_depend SET refobjversion = %s WHERE objid = '%u'::pg_catalog.oid AND refclassid = 'pg_catalog.pg_collation'::regclass AND refobjversion IS NOT NULL AND refobjid = ",
0 commit comments