This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: undesired switch fall-through in socketmodule.c
Type: behavior Stage: resolved
Components: Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, brian.curtin, dontbugme, georg.brandl, pitrou, vstinner
Priority: normal Keywords: needs review, patch

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:43adminsetgithub: 49022
2010-02-04 20:26:57pitrousetstatus: open -> closed
resolution: fixed
messages: + msg98855

stage: patch review -> resolved
2010-02-02 00:47:43brian.curtinsetfiles: + issue4772.diff
2010-02-02 00:47:08brian.curtinsetfiles: - issue4772.diff
2010-02-02 00:33:18brian.curtinsetfiles: + issue4772.diff

messages: + msg98702
2010-02-02 00:30:05brian.curtinsetfiles: - issue4772.diff
2010-01-13 07:24:15pitrousetnosy: + pitrou
messages: + msg97695
2010-01-13 02:05:27brian.curtinsetpriority: normal
type: behavior
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 3.0
2009-12-23 02:21:00brian.curtinsetfiles: + issue4772.diff
nosy: + brian.curtin
messages: + msg96829

2009-01-01 20:45:26vstinnersetnosy: + vstinner
messages: + msg78728
2009-01-01 12:37:27georg.brandlsetnosy: + georg.brandl
messages: + msg78703
2008-12-31 15:50:59amaury.forgeotdarcsetfiles: + bluetooth.patch
versions: + Python 2.6, Python 3.0
nosy: + amaury.forgeotdarc
messages: + msg78615
keywords: + needs review, patch
stage: patch review
2008-12-29 20:36:13dontbugmecreate