Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85837b8

Browse files
Fix handling of NULL return value in typarray lookup
Commit6ebeeae accidentally omitted testing the return value fromfindTypeByOid which can return NULL. Fix by adding a check to makesure that we have a pointer to dereference.Author: Ranier Vilela <ranier.vf@gmail.com>Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>Reviewed-by: Daniel Gustafsson <daniel@yesql.se>Discussion:https://postgr.es/m/CAEudQAqfMTH8Ya_J6E-NW_y_JyDFDxtQ4V_g6nY_1=0oDbQqdg@mail.gmail.com
1 parent4af123a commit85837b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5420,7 +5420,10 @@ binary_upgrade_set_type_oids_by_type_oid(Archive *fout,
54205420
pg_type_oid);
54215421

54225422
tinfo = findTypeByOid(pg_type_oid);
5423-
pg_type_array_oid = tinfo->typarray;
5423+
if (tinfo)
5424+
pg_type_array_oid = tinfo->typarray;
5425+
else
5426+
pg_type_array_oid = InvalidOid;
54245427

54255428
if (!OidIsValid(pg_type_array_oid) && force_array_type)
54265429
pg_type_array_oid = get_next_possible_free_pg_type_oid(fout, upgrade_query);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp