Skip to content

Commit 7281f62

Browse files
committed
Check length before reading post data.
Fixes a rare exception while auto-switching to IE engine.
1 parent efbccd1 commit 7281f62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

extension/modules/ContentPolicy.jsm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ var PolicyPrivate = {
374374
if (uploadChannel && uploadChannel.uploadStream)
375375
{
376376
let len = uploadChannel.uploadStream.available();
377-
post = NetUtil.readInputStreamToString(uploadChannel.uploadStream, len);
377+
if (len > 0)
378+
post = NetUtil.readInputStreamToString(uploadChannel.uploadStream, len);
378379
}
379380

380381
// Pass the navigation paramters througth tab attributes

0 commit comments

Comments
 (0)