Back out 20ad3570d599 (bug 716556) for xpcshell orange
authorPhil Ringnalda <philringnalda@gmail.com>
Wed, 08 Feb 2012 22:11:42 -0800
changeset 86474 9e23446b3559dacf96cb9e1df9859eb2f0e7389c
parent 86473 8d88f07c034f74cc0802fda4df7db7ce8edeeec7
child 86475 c6dda929759e0f36d50b5df9c6e44bcd15804401
push id5881
push userphilringnalda@gmail.com
push dateThu, 09 Feb 2012 06:18:19 +0000
treeherdermozilla-inbound@9e23446b3559 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs716556
milestone13.0a1
backs out20ad3570d59973829fe57035dfb3086515c08dd9
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Back out 20ad3570d599 (bug 716556) for xpcshell orange
xpcom/io/nsScriptableInputStream.cpp
--- a/xpcom/io/nsScriptableInputStream.cpp
+++ b/xpcom/io/nsScriptableInputStream.cpp
@@ -64,19 +64,16 @@ nsScriptableInputStream::Available(PRUin
 NS_IMETHODIMP
 nsScriptableInputStream::Read(PRUint32 aCount, char **_retval) {
     nsresult rv = NS_OK;
     PRUint32 count = 0;
     char *buffer = nsnull;
 
     if (!mInputStream) return NS_ERROR_NOT_INITIALIZED;
 
-    // bug716556 - Need room room for the null byte
-    if (aCount > PR_UINT32_MAX - 1) return NS_ERROR_ILLEGAL_VALUE;
-
     rv = mInputStream->Available(&count);
     if (NS_FAILED(rv)) return rv;
 
     count = NS_MIN(count, aCount);
     buffer = (char*)nsMemory::Alloc(count+1); // make room for '\0'
     if (!buffer) return NS_ERROR_OUT_OF_MEMORY;
 
     PRUint32 amtRead = 0;