Issue 4772: undesired switch fall-through in socketmodule.c (original) (raw)

Issue4772

Created on 2008-12-29 20:36 by dontbugme, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bluetooth.patch amaury.forgeotdarc,2008-12-31 15:50
issue4772.diff brian.curtin,2010-02-02 00:47
Messages (8)
msg78483 - (view) Author: (dontbugme) Date: 2008-12-29 20:36
makesockaddr() in socketmodule.c will fall through from AF_BLUETOOTH to AF_PACKET if none of Bluetooth protocols match. That's not a very appropriate thing to do.
msg78615 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-12-31 15:50
See attached patch.
msg78703 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-01-01 12:37
TypeError or ValueError?
msg78728 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2009-01-01 20:45
makesockaddr() raise a TypeError("Invalid address type") for an invalid AF_TIPC address, but I would prefer a ValueError.
msg96829 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2009-12-23 02:20
I think both AF_BLUETOOTH and AF_TIPC should raise ValueError since the type of the argument is correct but it's not a good value. I piggybacked on Amaury's patch and changed the exceptions with a patch against r77004.
msg97695 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-01-13 07:24
"makesockaddr" shouldn't be mentioned in the exception message, since it's just an internal helper function.
msg98702 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-02-02 00:33
Minor change to the patch to correct for Antoine's suggestion.
msg98855 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-02-04 20:26
Committed in all four branches, thank you.
History
Date User Action Args
2022-04-11 14:56:43 admin set github: 49022
2010-02-04 20:26:57 pitrou set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2010-02-02 00:47:43 brian.curtin set files: + issue4772.diff
2010-02-02 00:47:08 brian.curtin set files: - issue4772.diff
2010-02-02 00:33:18 brian.curtin set files: + issue4772.diffmessages: +
2010-02-02 00:30:05 brian.curtin set files: - issue4772.diff
2010-01-13 07:24:15 pitrou set nosy: + pitroumessages: +
2010-01-13 02:05:27 brian.curtin set priority: normaltype: behaviorversions: + Python 3.1, Python 2.7, Python 3.2, - Python 3.0
2009-12-23 02:21:00 brian.curtin set files: + issue4772.diffnosy: + brian.curtinmessages: +
2009-01-01 20:45:26 vstinner set nosy: + vstinnermessages: +
2009-01-01 12:37:27 georg.brandl set nosy: + georg.brandlmessages: +
2008-12-31 15:50:59 amaury.forgeotdarc set files: + bluetooth.patchversions: + Python 2.6, Python 3.0nosy: + amaury.forgeotdarcmessages: + keywords: + needs review, patchstage: patch review
2008-12-29 20:36:13 dontbugme create