Commit 2a04712
committed
shared/varlink: add missing terminator in json strings
Should finally fix oss-fuzz-14688.
8688c29 wasn't enough.
The buffer retrieved from memstream has the size that the same as the written
data. When we write do write(f, s, strlen(s)), then no terminating NUL is written,
and the buffer is not (necessarilly) a proper C string.1 parent c2babfc commit 2a04712
3 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1555 | 1555 | | |
1556 | 1556 | | |
1557 | 1557 | | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
1558 | 1561 | | |
1559 | 1562 | | |
1560 | 1563 | | |
| |||
1567 | 1570 | | |
1568 | 1571 | | |
1569 | 1572 | | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
1570 | 1576 | | |
1571 | 1577 | | |
1572 | 1578 | | |
1573 | 1579 | | |
1574 | 1580 | | |
1575 | 1581 | | |
1576 | 1582 | | |
1577 | | - | |
1578 | | - | |
| 1583 | + | |
| 1584 | + | |
1579 | 1585 | | |
1580 | 1586 | | |
1581 | 1587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1212 | 1212 | | |
1213 | 1213 | | |
1214 | 1214 | | |
| 1215 | + | |
1215 | 1216 | | |
1216 | 1217 | | |
1217 | 1218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
0 commit comments