Commit 828b5b2
Fix BUFFER_OVERFLOW.SPRINTF in zos-remote-plugin.c
Replace sprintf with snprintf to prevent potential buffer overflow
when formatting logString buffer.
Svace report:
Warning: An element of array '&logString[0]' of size 200 is accessed
by an index with values in [0, +inf] which may lead to a buffer overflow.
Format string: 'Linux (%s): type: %s'. Filled values can have unlimited
string length. (CWE120, CWE121, CWE122, CWE124, CWE134, CWE20)
Location: zos-remote-plugin.c:227
Co-authored-by: Z.AI GLM-51 parent c5bf92d commit 828b5b2
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
0 commit comments