cppcheck icon indicating copy to clipboard operation
cppcheck copied to clipboard

fixed #11372 - potential `UnicodeDecodeError` with `subprocess.Popen()`

Open firewave opened this issue 3 years ago • 2 comments

Passing universal_newlines=True to subprocess.Popen() will implicitly perform decode(). But this might encounter errors which need to be ignored. Unfortunately the required options encoding and errors are not available until Python 3.6 so we still need to use decode() instead.

firewave avatar Nov 28 '22 20:11 firewave

Still a draft since I only have tested the daca client script so far.

firewave avatar Nov 28 '22 20:11 firewave

I have a different approach which tries to mitigate the errors instead of ignoring them. Needs some more testing though.

firewave avatar Mar 09 '23 23:03 firewave