diff options
author | Werner Koch <wk@gnupg.org> | 2015-06-26 12:04:20 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-06-26 12:04:20 +0200 |
commit | 0da6afa864cfd68333941d6332d762c82928946c (patch) | |
tree | a3035647b585a04723c2130124e45a12fbf473a4 /doc | |
parent | c6b131949bb6c77392af2cbbbeb8ea1bed129b79 (diff) | |
download | libassuan-0da6afa864cfd68333941d6332d762c82928946c.tar.gz |
Do not segv if NULL is passed for CTX in sendfd and receivefd.
* src/assuan-buffer.c (assuan_sendfd): Check that CTX is not NULL.
(assuan_receivefd): Ditto.
--
This change is to align the behaviour with that of assuan_send_data.
Suggested-by: Andre Heinecke.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/assuan.texi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/assuan.texi b/doc/assuan.texi index 358357c..10b309c 100644 --- a/doc/assuan.texi +++ b/doc/assuan.texi @@ -1205,8 +1205,10 @@ The descriptor must be sent before the command is issued that makes use of the descriptor. Note that calling this function with a @var{ctx} of @code{NULL} and -@var{fd} of @code{-1} can be used as a runtime test to check whether -descriptor passing is available on the platform. If it is, 0 is returned, otherwise an error with the error code @code{GPG_ERR_NOT_IMPLEMENTED}. +@var{fd} of @code{ASSUAN_INVALID_FD} can be used as a runtime test to +check whether descriptor passing is available on the platform: +@code{0} is returned if descriptor passing is available, otherwise an +error with the error code @code{GPG_ERR_NOT_IMPLEMENTED} is returned. @end deftypefun @anchor{function assuan_receivefd} |