mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 14:12:33 +00:00
The saved Cppcheck report warns about the formatter output: scst/src/scst_main.c:637: warning: Uninitialized variable: buf [uninitvar] scst_dump_cdb does not write anything when cdb_len is zero, but scst_trace_cmds prints its stack buffer as a string. Unknown opcode groups can produce an empty CDB, so termination must not depend on valid command contents. Initialize nonempty output buffers and leave zero-capacity buffers untouched. Add KUnit coverage for empty, ordinary, truncated, one-byte and zero-size output. Include the new private test header in generated kernel patches.