roc230 / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

java.nio.BufferOverflowException for cas in ascii protocol #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
memcached-2.3.1.jar on OSX 10.5.7

In the ascii protocol, I get a java.nio.BufferOverflowException once the 
combined length of the 
data size and the cas unique value (which is 64-bit) exceeds 
CASOperationImpl.OVERHEAD.  I 
was able to reproduce by doing a cas with long, made-up casId.  Doesn't seem to 
happen with 
the binary protocol.

java.nio.BufferOverflowException
                at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:165)
                at java.nio.ByteBuffer.put(ByteBuffer.java:813)
                at
net.spy.memcached.protocol.ascii.CASOperationImpl.initialize(CASOperationImpl.ja
va:62)
                at
net.spy.memcached.MemcachedConnection.addOperation(MemcachedConnection.java:541)
                at
net.spy.memcached.MemcachedConnection.addOperation(MemcachedConnection.java:533)
                at
net.spy.memcached.MemcachedClient.addOp(MemcachedClient.java:244)
                at
net.spy.memcached.MemcachedClient.asyncCAS(MemcachedClient.java:414)
                at
...

Original issue reported on code.google.com by x%xtophe...@gtempaccount.com on 30 Jul 2009 at 12:45

GoogleCodeExporter commented 9 years ago
Fixed in master.  Thanks.

Original comment by dsalli...@gmail.com on 13 Aug 2009 at 7:12