checking the length of ASCII string allowing trailing 0.#585
Merged
kazu-yamamoto merged 2 commits intohaskell:masterfrom Aug 27, 2024
Merged
checking the length of ASCII string allowing trailing 0.#585kazu-yamamoto merged 2 commits intohaskell:masterfrom
kazu-yamamoto merged 2 commits intohaskell:masterfrom
Conversation
nh2
reviewed
Jul 12, 2024
Network/Socket/Types.hsc
Outdated
| let pathC = map castCharToCChar path | ||
| when (length pathC >= unixPathMax) $ error | ||
| $ "pokeSockAddr: path is too long in SockAddrUnix " <> show path | ||
| <> ", length " <> show (length path) <> ", unixPathMax " <> show unixPathMax |
Member
There was a problem hiding this comment.
It might be good to change the error message to show (length pathC); currently it's equivalent since done with map, but maybe in the future we lift the constraint in the future that the path must not contain unicode chars (which is a pretty weird contraint because it should prevent anybody who uses non-ASCII chars in their home directory to place sockets there).
Otherwise, looks good!
Collaborator
Author
There was a problem hiding this comment.
Fixed. Please check it again.
Collaborator
Author
|
Merging without the second review. |
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Jan 30, 2025
## Version 3.2.7.0 * Using nested `bracket` for `gracefulClose`. [#591](haskell/network#590) * Fix memory leak in getaddrinfo and make it async exception safe. [#591](haskell/network#591) * Make call to c_free async exception safe. [#592](haskell/network#592) ## Version 3.2.6.0 * fixing the Show instance of IPv4-mapped IPv6 address on little endian machines ## Version 3.2.5.0 * `gracefulClose` based on STM racing and `timeout`. [#587](haskell/network#587) ## Version 3.2.4.0 * New API: setSockOptValue. [#588](haskell/network#588) ## Version 3.2.3.0 * Making getAddrInfo polymorphic [#587](haskell/network#587) ## Version 3.2.2.0 * New API: waitReadSocketSTM, waitAndCancelReadSocketSTM, waitWriteSocketSTM, waitAndCancelWriteSocketSTM [#586](haskell/network#586) * Checking the length of ASCII string allowing trailing 0. [#585](haskell/network#585) ## Version 3.2.1.0 * Trying to release with the latest autoreconf. Packing "network" in the local directory instead of CI. * Remove includes from .cabal-file [#583](haskell/network#583) * making gracefulClose more graceful [#580](haskell/network#580) * Update config.guess, config.sub to their latest versions [#579](haskell/network#579)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@nh2 This should fix #584