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
Fixed a crash in tsql_row_to_xml_path function that occurred when processing FOR XML PATH queries with all-null column values. The crash was caused by unsafe string buffer manipulation when converting null elements to self-closing XML tags without proper bounds checking.
This fix reorganizes the null-handling logic to prevent buffer underflow.
Task: BABEL-5364
Authored-by: Rohit Bhagat rohitbgt@amazon.com
Copy file name to clipboardExpand all lines: test/JDBC/expected/forxml-path-vu-prepare.out
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,20 @@ GO
6
6
~~ROW COUNT: 9~~
7
7
8
8
9
+
CREATE TABLE for_xml_path_all_null (col1 INT NULL);
10
+
GO
11
+
12
+
SET NOCOUNT ON
13
+
GO
14
+
15
+
DECLARE @i INT = 1;
16
+
WHILE @i <= 2048
17
+
BEGIN
18
+
INSERT INTO for_xml_path_all_null VALUES (NULL);
19
+
SET @i = @i + 1;
20
+
END
21
+
GO
22
+
9
23
CREATE VIEW for_xml_path_v1 AS SELECT String as param1, hello.String as [@param2] FROM for_xml_path hello ORDER BY SequenceNumber FOR XML PATH('hello')
0 commit comments