Commit 5e1365a
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 4c60a77 commit 5e1365a
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
| 1070 | + | |
| 1071 | + | |
1071 | 1072 | | |
1072 | 1073 | | |
1073 | 1074 | | |
1074 | 1075 | | |
1075 | 1076 | | |
1076 | | - | |
| 1077 | + | |
| 1078 | + | |
1077 | 1079 | | |
1078 | 1080 | | |
1079 | 1081 | | |
| |||
1218 | 1220 | | |
1219 | 1221 | | |
1220 | 1222 | | |
1221 | | - | |
1222 | | - | |
| 1223 | + | |
| 1224 | + | |
1223 | 1225 | | |
1224 | 1226 | | |
1225 | 1227 | | |
| |||
0 commit comments