Skip to content
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

Infinite loop in readbytes!(s, UInt8[], 1) #193

Closed
nhz2 opened this issue Mar 27, 2024 · 0 comments · Fixed by #194
Closed

Infinite loop in readbytes!(s, UInt8[], 1) #193

nhz2 opened this issue Mar 27, 2024 · 0 comments · Fixed by #194
Labels

Comments

@nhz2
Copy link
Member

nhz2 commented Mar 27, 2024

Here is an example that goes into an infinite loop:

julia> using TranscodingStreams

julia> s = NoopStream(IOBuffer("abc"));

julia> readbytes!(s, UInt8[], 1)

The issue is

resize!(b, min(length(b) * 2, nb))

if length(b) is 0 then the b stays the same size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant