Content-Length: 258387 | pFad | http://github.com/postgrespro/postgres_cluster/commit/1fe1204e87c467221277d1789f1a530a27e15bd2

97 Add missing check for malloc failure in plpgsql_extra_checks_check_ho… · postgrespro/postgres_cluster@1fe1204 · GitHub
Skip to content

Commit 1fe1204

Browse files
committed
Add missing check for malloc failure in plpgsql_extra_checks_check_hook().
Per report from Andreas Seltenreich. Back-patch to affected versions. Report: <874m8nn0hv.fsf@elite.ansel.ydns.eu>
1 parent e611515 commit 1fe1204

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pl/plpgsql/src/pl_handler.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ plpgsql_extra_checks_check_hook(char **newvalue, void **extra, GucSource source)
110110
}
111111

112112
myextra = (int *) malloc(sizeof(int));
113+
if (!myextra)
114+
return false;
113115
*myextra = extrachecks;
114116
*extra = (void *) myextra;
115117

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/1fe1204e87c467221277d1789f1a530a27e15bd2

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy