-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible Over-Iteration in PrettyBytes #139
Comments
Yup, it sure does! Would you like to submit a patch to fix it? As a practical matter I think we can ignore the regions here, and just use the sequence conformance directly. |
5 tasks
PR done. Don't know how to construct a multi-region |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was looking for a not
%02x
way of converting binary to hexString
, and I stumbled upon the implementation inPrettyBytes.swift
.swift-crypto/Sources/Crypto/Util/PrettyBytes.swift
Lines 45 to 51 in 9cc89f0
I'm not 100% sure about the
Sequence
conformance of non-contiguousDataProtocol
, but it seemed to me that theself
on line 46 should be the ignored parameter$0
(or maybe eliminate the region logic since looping overself
most likely would have taken non-contiguous memory regions into account?), otherwise the code reads:Unless non-contiguous
DataProtocol
has non-stable indices and iterators, this code will over/re-iterate the data buffer.The text was updated successfully, but these errors were encountered: