nsBufferedOutputStream::WriteSegments doesn't handle the reader returning zero

NEW
Unassigned

Status

()

Core
Networking
P3
normal
12 years ago
10 months ago

People

(Reporter: Biesinger, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [necko-backlog], URL)

Per http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsIOutputStream.idl#60, the reader for writeSegments is allowed to return success and zero bytes. But, the buffered output stream does not handle that, it looks like it would go into an infinite loop in that case.

This is a quite relevant case since when used via writeFrom, this would hang at EOF (when the input stream would return zero).
Whiteboard: [necko-backlog]
Severity: critical → normal
You need to log in before you can comment on or make changes to this bug.