From dd5bef3c2a1139cc33e295bd3f6c0fba32da9e0b Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Fri, 29 Sep 2006 22:32:16 +0000 Subject: [PATCH] in miCASAReadKey, fix hang if too small of buffer was passed in. --- CASA/micasacache/sscs_unx_ipc_client.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CASA/micasacache/sscs_unx_ipc_client.c b/CASA/micasacache/sscs_unx_ipc_client.c index ecde063e..b636fd07 100644 --- a/CASA/micasacache/sscs_unx_ipc_client.c +++ b/CASA/micasacache/sscs_unx_ipc_client.c @@ -2111,14 +2111,12 @@ int32_t ipc_ReadKey n = dataLen; while(n) { - int bytes = IPC_READ(ssHandle->platHandle, gpReplyBuf, MIN_REPLY_BUF_LEN); - if( bytes > 0) - n -= MIN_REPLY_BUF_LEN; + int bytesRead = IPC_READ(ssHandle->platHandle, gpReplyBuf, n); + if( bytesRead > 0) + n -= bytesRead; else break; } - // Read the sscs return code also. - IPC_READ(ssHandle->platHandle, (Byte *) &sockReturn, MSG_DWORD_LEN); retCode = NSSCS_E_ENUM_BUFF_TOO_SHORT; break; }