[rules-users] com.google.protobuf.InvalidProtocolBufferException thrown when deserializing

Esteban Aliverti esteban.aliverti at gmail.com
Mon Jul 23 09:11:17 EDT 2012


It seems that this is some kind of security mechanism in googles' protobuf
(the serialization framework Drools is using).
>From protobuf's documentation:

CodeInputStream.setSizeLimit():
"Set the maximum message size. In order to prevent malicious messages from
exhausting memory or causing integer overflows, CodedInputStream limits how
large a message may be. The default limit is 64MB. You should set this
limit as small as you can without harming your app's functionality. Note
that size limits only apply when reading from an InputStream, not when
constructed around a raw byte array (nor with
ByteString.newCodedInput()<https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/ByteString.html#newCodedInput()>
)."

It appears to me that Drools needs to expose this configuration to end
users in some way (not sure if it is already exposed), or use a ridiculous
large predefined size.

Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com


On Mon, Jul 23, 2012 at 3:06 PM, chrisLi <shengtao0077 at 163.com> wrote:

> Hi Laune,
>
>     Thank you very much for your quick response.
>
>     I did not understand your response very clearly. Could you explain it
> in
> more detail.
>
>     Thank you!
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/com-google-protobuf-InvalidProtocolBufferException-thrown-when-deserializing-tp4018822p4018830.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120723/35653ccd/attachment.html 


More information about the rules-users mailing list