iscsi-scstd: Supply an empty buffer when finalizing an AF_ALG hash

The saved Cppcheck report flags the zero-length final send:

  iscsi-scst/usr/af_alg.c:76: error: Null pointer dereference
  [nullPointer]

Linux accepts a NULL buffer for this zero-length AF_ALG operation; this
report does not establish a runtime dereference. Pass an empty string
instead so the buffer contract is explicit without a model or waiver.
The length remains zero and MSG_MORE remains clear, preserving hash
finalization behavior.
This commit is contained in:
Gleb Chesnokov
2026-10-21 13:20:12 +03:00
parent f480fc71ff
commit 6ba7a47525
+1 -1
View File
@@ -73,7 +73,7 @@ ssize_t af_alg_final(int datafd, void *out, size_t len)
char buffer[1024];
ssize_t res;
res = send(datafd, NULL, 0, 0);
res = send(datafd, "", 0, 0);
if (res == -1)
return -errno;