summaryrefslogtreecommitdiff
path: root/src/lib/pubsub
diff options
context:
space:
mode:
authorc <c@chroniko.jp>2020-10-09 03:10:24 +0000
committerDavid Goulet <dgoulet@torproject.org>2021-10-04 15:19:16 -0400
commit6ada3be8f17ebc81352a3e44c4a92f8adff6bfee (patch)
tree3b3a6120b5468e46770654343ee2371a4496c29b /src/lib/pubsub
parent3c13886317589b58de2ebacef4e2fa7b5b864a33 (diff)
downloadtor-6ada3be8f17ebc81352a3e44c4a92f8adff6bfee.tar.gz
tor-6ada3be8f17ebc81352a3e44c4a92f8adff6bfee.zip
net: Reject invalid characters in port ranges
Fixes issue #22469 where port strings such as '0x00' get accepted, not because the string gets converted to hex, but because the string is silently truncated past the invalid character 'x'. This also causes issues for strings such as '0x01-0x02' which look like a hex port range, but in reality gets truncated to '0', which is definitely not what a user intends. Warn and reject such port strings as invalid. Also, since we're throwing that "malformed port" warning a lot in the function, wrap it up in a nice goto. Fixes #22469
Diffstat (limited to 'src/lib/pubsub')
0 files changed, 0 insertions, 0 deletions