Files
scst/usr
Gleb Chesnokov 0848c42fe2 scst: Copy bounded strings and protocol fragments explicitly
Copy iSCSI text fragments as bytes: their lengths are bounded by the
remaining strlen, while framing emits separators and terminators
separately. Keep virtual-device name rejection and use the existing
strscpy compatibility helper for accepted bounded names.

Reuse checked redirect and directory-entry lengths, including the NUL,
and copy the fixed CHAP prefix by its literal size. Replace command-line
strncpy/termination pairs with snprintf while retaining existing
truncation and zero-filled padding. Copy terminated fixed-width event
fields and the constant core issuer by their exact extents.

Checkpatch reports STRNCPY:

  Prefer strscpy, strscpy_pad, or __nonstring over strncpy

Checkpatch reports STRCPY:

  Prefer strscpy over strcpy
2026-10-21 22:12:25 +03:00
..