erdemolkun / plist

Automatically exported from code.google.com/p/plist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrecting parsing of InputStream data

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?

Use any InputStream whose available() method does not return the total number 
of bytes in the stream. Then the stream will not be read fully.

Original issue reported on code.google.com by daniel.dreibrodt on 4 Aug 2011 at 12:49

Yes, isAvailable() doesn't return the total number of bytes, just the total 
number of bytes available without blocking.  Similarly, read() doesn't read all 
the bytes, just those that can be read without blocking.  I can hack up a fix...

Original comment by kei...@alum.mit.edu on 4 Aug 2011 at 1:14

I would be able to fix it earliest on Saturday. So I've you've got time right 
now you're welcome to fix the problem.

Original comment by daniel.dreibrodt on 4 Aug 2011 at 1:17

Here's a fix.  I can't seem to commit it at the moment, though, not sure why.  
I've attached a patch.

Original comment by kei...@alum.mit.edu on 4 Aug 2011 at 1:39

Attachments:

Fixed in r30.

Original comment by daniel.dreibrodt on 4 Aug 2011 at 7:41

  • Changed state: Fixed