Assert against invalid inputs in Utils.run_prefork_process

This commit is contained in:
Thomas Nagy 2017-07-01 13:15:17 +02:00
parent cddc5552e4
commit cc9374b646
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
1 changed files with 4 additions and 1 deletions

View File

@ -895,7 +895,10 @@ def run_prefork_process(cmd, kwargs, cargs):
raise OSError('Preforked sub-process %r died' % proc.pid)
process_pool.append(proc)
ret, out, err, ex, trace = cPickle.loads(base64.b64decode(obj))
lst = cPickle.loads(base64.b64decode(obj))
# Jython wrapper failures (bash/execvp)
assert len(lst) == 5
ret, out, err, ex, trace = lst
if ex:
if ex == 'OSError':
raise OSError(trace)