Author: fhanik
Date: Sun Aug 24 10:46:03 2008
New Revision: 688538
URL: http://svn.apache.org/viewvc?rev=688538&view=rev
Log:
final fix for 44494, avoid NPE during recycle
Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java
tomcat/current/tc5.5.x/STATUS.txt
Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java
URL:
http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=688538&r1=688537&r2=688538&view=diff
==============================================================================
---
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java
(original)
+++
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/B2CConverter.java
Sun Aug 24 10:46:03 2008
@@ -237,6 +237,7 @@
*/
final class IntermediateInputStream extends InputStream {
ByteChunk bc = null;
+ boolean initialized = false;
public IntermediateInputStream() {
}
@@ -247,15 +248,18 @@
}
public final int read(byte cbuf[], int off, int len) throws IOException {
+ if (!initialized) return -1;
int nread = bc.substract(cbuf, off, len);
return nread;
}
public final int read() throws IOException {
+ if (!initialized) return -1;
return bc.substract();
}
public int available() throws IOException {
+ if (!initialized) return 0;
return bc.getLength();
}
@@ -264,6 +268,7 @@
void setByteChunk( ByteChunk mb ) {
+ initialized = (mb!=null);
bc = mb;
}
Modified: tomcat/current/tc5.5.x/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=688538&r1=688537&r2=688538&view=diff
==============================================================================
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Sun Aug 24 10:46:03 2008
@@ -88,10 +88,3 @@
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties?r1=656035&r2=687503
+1: markt
-1:
-
-* Additional fix for 44494, holding up 5.5.27
- http://people.apache.org/~fhanik/patches/55-44494.patch
- Reproduce error, call getReader, but never use the converter. You'll get a
NPE on InputBuffer.recycle()
- +1: fhanik, jfclere, rjung
- -1:
-
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]