Author: mturk Date: Thu Aug 11 17:14:24 2011 New Revision: 1156681 URL: http://svn.apache.org/viewvc?rev=1156681&view=rev Log: Make sure pointer is set to on stack buffer
Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/sockstream.c Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/sockstream.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/sockstream.c?rev=1156681&r1=1156680&r2=1156681&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/unix/sockstream.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/unix/sockstream.c Thu Aug 11 17:14:24 2011 @@ -212,6 +212,10 @@ ACR_NET_EXPORT(jint, SocketStream, read1 bb = ACR_MALLOC(jbyte, len); } } + else { + /* Use provided stack buffer */ + bb = onstack; + } if (bb == 0) { rc = ACR_ENOMEM; goto finally;