commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1156681 - /commons/sandbox/runtime/trunk/src/main/native/os/unix/sockstream.c
Date Thu, 11 Aug 2011 17:14:24 GMT
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;



Mime
View raw message