]> git.ipfire.org Git - thirdparty/samba.git/commit
s3:libsmb: Check if we have a valid file descriptor
authorAndreas Schneider <asn@samba.org>
Fri, 21 Jun 2024 08:48:01 +0000 (10:48 +0200)
committerMartin Schwenke <martins@samba.org>
Sun, 30 Jun 2024 23:20:34 +0000 (23:20 +0000)
commit321ee914a4b5232c2ff451352e2f5b5d0bf9a96c
tree2caf4381229bea6ea54930e36a98ed3942308926
parent57001527ae6209ec907d37e8b96a2e545cfe632e
s3:libsmb: Check if we have a valid file descriptor

"Error: REVERSE_NEGATIVE (CWE-191):
samba-4.20.0rc2/source3/libsmb/pylibsmb.c:215: negative_sink_in_call: Passing ""t->shutdown_pipe[1]"" to a parameter that cannot be negative.
samba-4.20.0rc2/source3/libsmb/pylibsmb.c:230: check_after_sink: You might be using variable ""t->shutdown_pipe[1]"" before verifying that it is >= 0.
  228|    t->shutdown_pipe[0] = -1;
  229|    }
  230|->  if (t->shutdown_pipe[1] != -1) {
  231|    close(t->shutdown_pipe[1]);
  232|    t->shutdown_pipe[1] = -1;"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
source3/libsmb/pylibsmb.c