harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura" <stepan.mish...@gmail.com>
Subject Re: [classlib][security] HARMONY-5054 status was ([jira] Created: (HARMONY-5054) [ASN.1] BerInputStream will incorrectly resize buffer when the enveloped InputStream has lots of bytes)
Date Mon, 12 Nov 2007 15:52:20 GMT
On 11/12/07, Spark Shen <smallsmallorgan@gmail.com> wrote:
> Hi
> Stepan, Sorry for the so late reply. Regis, Liang Jia & I was busy
> developing ldap features and did not notice your comment. Please see my in
> line comments.
> <snip>
> But I can not understand what wrong with the BerInputStream constructor - in
> case of InputStream parameter the data is read from the beggining so offeset
> has to be 0.
> </snip>
> I think the problem is the next() method invocation on line 132 of
> constructor. In this method offset is updated. So when the program goes
> through line 137, the offset
> is no longer zero.

Hi Spark,

You are right. Thanks for the reproducer!
I think this execution path has never been tested. I've fixed it at r594188.

> <snip>
> A standalone test case would greatly help to understand what should be
> fixed.
> </snip>
> The test case requires a ldap server, and I planned to provide a scenario
> test and a adapter to BTI. But the effort was not trial as I expected.

If you let me know how large ldap request is and its bytes values in
the beginning then I can try to create a reproducer without ldap


> <snip>
> Could you provide first 10 bytes of incoming data and total size of ldap
> server request?
> </snip>
> Wait a minute please, I am working on it. :-)
> --
> Spark Shen
> China Software Development Lab, IBM

View raw message