Commit f064a4f
committed
Fix null-dereference crash in parse_xml_decl().
parse_xml_decl's header comment says you can pass NULL for any unwanted
output parameter, but it failed to honor this contract for the "standalone"
flag. The only currently-affected caller is xml_recv, so the net effect is
that sending a binary XML value containing a standalone parameter in its
xml declaration would crash the backend. Per bug #6044 from Christopher
Dillard.
In passing, remove useless initializations of parse_xml_decl's output
parameters in xml_parse.
Back-patch to 8.3, where this code was introduced.1 parent f014211 commit f064a4f
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | | - | |
| 1107 | + | |
| 1108 | + | |
1108 | 1109 | | |
1109 | 1110 | | |
1110 | 1111 | | |
1111 | 1112 | | |
1112 | 1113 | | |
1113 | | - | |
| 1114 | + | |
| 1115 | + | |
1114 | 1116 | | |
1115 | 1117 | | |
1116 | 1118 | | |
| |||
1254 | 1256 | | |
1255 | 1257 | | |
1256 | 1258 | | |
1257 | | - | |
1258 | | - | |
| 1259 | + | |
| 1260 | + | |
1259 | 1261 | | |
1260 | 1262 | | |
1261 | 1263 | | |
| |||
0 commit comments