Commit 0bb6ada
in_systemd: fix buffer over-read
Fix buffer over-reads in systemd input plugin (#9788).
In systemd_enumerate_data_store: when copying the item value
the input string may not be 0-terminated, so relying on
strlen may lead to reads beyond the end of the buffer.
Use the known string length instead of strlen.
Signed-off-by: Bodo Petermann <[email protected]>1 parent c98ed65 commit 0bb6ada
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
0 commit comments