The SIsendt function was not properly checking the file descriptor
and could core dump when an attempt was made to send on a connection
that was closed.
Issue-ID: RIC-207
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I09b33bf1185aef609bfff058b272e1895eb1a29d
API and build change and fix summaries. Doc correctsions
and/or changes are not mentioned here; see the commit messages.
+2020 February 14; version 3.1.3
+ Fix bug in SIsend which was causing a core dump in some cases
+ where the application attempted to send on a connection that
+ had disconnected. (RIC-207).
+
2020 February 6; version 3.1.2
Fix disconnection detection bug in interface to SI95.
set( major_version "3" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this
set( minor_version "1" )
-set( patch_level "2" )
+set( patch_level "3" )
set( install_root "${CMAKE_INSTALL_PREFIX}" )
set( install_inc "include/rmr" )
* Abstract: This module contains various send functions:
* SIsendt -- send tcp with queuing if would block
* SIsendt_nq - send tcp without queuing if blocking
-
+*
* Date: 27 March 1995
* Author: E. Scott Daniels
* Mod: 22 Feb 2002 - To better process queued data
+* 14 Feb 2020 - To fix index bug if fd < 0.
*
*****************************************************************************
*/
errno = EINVAL;
gptr->sierr = SI_ERR_SESSID;
+ if( fd < 0 ) {
+ return SI_ERROR; // bad form trying to use this fd
+ }
+
if( fd < MAX_FDS ) { // straight from map if possible
tpptr = gptr->tp_map[fd];
} else {