Files
Gleb Chesnokov b74e00e63b scst_main: Terminate trace output for an empty CDB
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.
2026-10-21 13:20:12 +03:00
..