[New-bugs-announce] [issue18549] Dead code in socket_ntohl()

Christian Heimes report at bugs.python.org
Wed Jul 24 21:20:10 CEST 2013


New submission from Christian Heimes:

http://hg.python.org/cpython/file/96d817f41c4c/Modules/socketmodule.c#l4642

The code has two checks if (x == (unsigned long) -1 && PyErr_Occurred()). Coverity claims that the second time is dead code and I agree. It looks like an artifact from the time the function didn't check for integer overflow. CID 982369

----------
messages: 193669
nosy: christian.heimes, haypo, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Dead code in socket_ntohl()
type: behavior
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18549>
_______________________________________


More information about the New-bugs-announce mailing list