Fix a memory bug on Linux. Code assumed that the platform is Windows and
tried to de-reference an integer thinking that it was a pointer.
This commit is contained in:
parent
9d671414ac
commit
3c94f4cba1
@ -299,7 +299,11 @@ int32_t ipc_OpenSecretStore
|
|||||||
if(retVal < 0)
|
if(retVal < 0)
|
||||||
{
|
{
|
||||||
DMSG(("Write failed : %s\n",strerror(errno)));
|
DMSG(("Write failed : %s\n",strerror(errno)));
|
||||||
|
#ifdef SSCS_WIN32_PLAT_F
|
||||||
DMSG(("Closing socket : %d\n",*(int*)ssHandle->platHandle));
|
DMSG(("Closing socket : %d\n",*(int*)ssHandle->platHandle));
|
||||||
|
#else
|
||||||
|
DMSG(("Closing socket : %d\n", ssHandle->platHandle));
|
||||||
|
#endif
|
||||||
DMSG(("ipc_OpenSecretStore:IPC_WRITE returned :%d\n",retVal));
|
DMSG(("ipc_OpenSecretStore:IPC_WRITE returned :%d\n",retVal));
|
||||||
IPC_CLOSE(ssHandle->platHandle);
|
IPC_CLOSE(ssHandle->platHandle);
|
||||||
retCode = NSSCS_E_SYSTEM_FAILURE;
|
retCode = NSSCS_E_SYSTEM_FAILURE;
|
||||||
@ -318,7 +322,11 @@ int32_t ipc_OpenSecretStore
|
|||||||
//log debug info here
|
//log debug info here
|
||||||
DMSG(("ipc_OpenSecretStore:read returned :%d\n",retVal));
|
DMSG(("ipc_OpenSecretStore:read returned :%d\n",retVal));
|
||||||
DMSG(("Read failed : %s\n",strerror(errno)));
|
DMSG(("Read failed : %s\n",strerror(errno)));
|
||||||
|
#ifdef SSCS_WIN32_PLAT_F
|
||||||
DMSG(("Closing socket : %d\n",*(int*)ssHandle->platHandle));
|
DMSG(("Closing socket : %d\n",*(int*)ssHandle->platHandle));
|
||||||
|
#else
|
||||||
|
DMSG(("Closing socket : %d\n", ssHandle->platHandle));
|
||||||
|
#endif
|
||||||
|
|
||||||
IPC_CLOSE(ssHandle->platHandle);
|
IPC_CLOSE(ssHandle->platHandle);
|
||||||
retCode = NSSCS_E_SYSTEM_FAILURE;
|
retCode = NSSCS_E_SYSTEM_FAILURE;
|
||||||
@ -337,7 +345,11 @@ int32_t ipc_OpenSecretStore
|
|||||||
if(sockReturn != SSCS_REPLY_SUCCESS)
|
if(sockReturn != SSCS_REPLY_SUCCESS)
|
||||||
{
|
{
|
||||||
DMSG(("ipc_OpenSecretStore:sscs returned :%d\n",sockReturn));
|
DMSG(("ipc_OpenSecretStore:sscs returned :%d\n",sockReturn));
|
||||||
|
#ifdef SSCS_WIN32_PLAT_F
|
||||||
DMSG(("Closing socket : %d\n",*(int*)ssHandle->platHandle));
|
DMSG(("Closing socket : %d\n",*(int*)ssHandle->platHandle));
|
||||||
|
#else
|
||||||
|
DMSG(("Closing socket : %d\n", ssHandle->platHandle));
|
||||||
|
#endif
|
||||||
IPC_CLOSE(ssHandle->platHandle);
|
IPC_CLOSE(ssHandle->platHandle);
|
||||||
retCode = mapReturnCode(sockReturn);
|
retCode = mapReturnCode(sockReturn);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user