summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/basicsocket/send_spec.rb
diff options
context:
space:
mode:
authorKasumi Hanazuki <[email protected]>2024-11-07 05:55:39 +0900
committerGitHub <[email protected]>2024-11-06 20:55:39 +0000
commit35bf6603372360c7680653328274a670fa1d9f38 (patch)
treef6982777da87e3f404b8d45478e80bef97dba3cf /spec/ruby/library/socket/basicsocket/send_spec.rb
parent56ecc243e230e8e99761ec0ffc5116601f094bb0 (diff)
io_buffer.c: Allow copies between overlapping buffers with #copy and #set_string (#11640)
The current implementation of `IO::Buffer#copy` and `#set_string` has an undefined behavior when the source and destination memory overlaps, due to the underlying use of the `memcpy` C function. This patch guarantees the methods to be safe even when copying between overlapping buffers by replacing `memcpy` with `memmove`, Fixes: [Bug #20745]
Notes
Notes: Merged-By: ioquatix <[email protected]>
Diffstat (limited to 'spec/ruby/library/socket/basicsocket/send_spec.rb')
0 files changed, 0 insertions, 0 deletions