projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c88eb09
)
windows/fixups.py: limit length of string passed in a single call to WriteConsoleW...
author
david-sarah
<david-sarah@jacaranda.org>
Wed, 27 Oct 2010 02:16:36 +0000
(19:16 -0700)
committer
david-sarah
<david-sarah@jacaranda.org>
Wed, 27 Oct 2010 02:16:36 +0000
(19:16 -0700)
src/allmydata/windows/fixups.py
patch
|
blob
|
history
diff --git
a/src/allmydata/windows/fixups.py
b/src/allmydata/windows/fixups.py
index ce8af4b205f309a7c4729733f7092b9e33797d99..12c725bccd9e7f44aae39360bf9eb36228ae4491 100644
(file)
--- a/
src/allmydata/windows/fixups.py
+++ b/
src/allmydata/windows/fixups.py
@@
-129,7
+129,9
@@
def initialize():
remaining = len(text)
while remaining > 0:
n = DWORD(0)
- retval = WriteConsoleW(self._hConsole, text, remaining, byref(n), None)
+ # There is a shorter-than-documented limitation on the length of the string
+ # passed to WriteConsoleW (see #1232).
+ retval = WriteConsoleW(self._hConsole, text, min(remaining, 10000), byref(n), None)
if retval == 0 or n.value == 0:
raise IOError("WriteConsoleW returned %r, n.value = %r" % (retval, n.value))
remaining -= n.value