Skip to content

[0.4.x] libvisual: Fix splitting of interleaved stereo - #152

Merged
hartwork merged 1 commit into
0.4.xfrom
0.4.x-fix-splitting-of-interleaved-stereo
Jan 9, 2023
Merged

hartwork merged 1 commit into
0.4.xfrom
0.4.x-fix-splitting-of-interleaved-stereo

Conversation

@hartwork

@hartwork hartwork commented Jan 7, 2023 •

Copy link
Copy Markdown
Member

Previously, twice as many bytes as available were read and written (heap-buffer-overflow) and the code was not robust towards and odd number of samples. Thanks to AddressSanitizer!

@hartwork hartwork added the bug label Jan 7, 2023
@hartwork hartwork added this to the 0.4.2 milestone Jan 7, 2023

@grandchild grandchild left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a small typo and extra space in the commit message:

-odd number of samples.  Thanks to AddressSanatizer!
+odd number of samples. Thanks to AddressSanitizer!

(but maybe that space is intentional?)

Comment thread libvisual/libvisual/lv_audio.c Resolved
Comment thread libvisual/libvisual/lv_audio.c Resolved
@hartwork
hartwork force-pushed the 0.4.x-fix-splitting-of-interleaved-stereo branch from 09fc2e5 to 5b01fa7 Compare January 8, 2023 23:38
Previously, twice as many bytes as available were read and written
(heap-buffer-overflow) and the code was not robust towards and
odd number of samples. Thanks to AddressSanitizer!

The two calls to visual_buffer_set_destroyer were dropped because
visual_buffer_new_allocate in macro STEREO_INTERLEAVED is already
setting visual_buffer_destroyer_free as a destroyer.
@hartwork
hartwork force-pushed the 0.4.x-fix-splitting-of-interleaved-stereo branch from 5b01fa7 to 4850128 Compare January 8, 2023 23:38
@hartwork

hartwork commented Jan 8, 2023

Copy link
Copy Markdown
Member Author

a small typo and extra space in the commit message:

-odd number of samples.  Thanks to AddressSanatizer!
+odd number of samples. Thanks to AddressSanitizer!

(but maybe that space is intentional?)

@grandchild I keep looking up the spelling of sanitizer and still it's hard to get right, good catch! 👍
The space was intentional (…) but I have dropped it here now.

Thanks for the review! 🙏

@hartwork
hartwork requested a review from grandchild January 8, 2023 23:44

@grandchild grandchild left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mnemonic: "same as 'sanitäter' in german" 😉

@hartwork
hartwork merged commit cbaa096 into 0.4.x Jan 9, 2023
@hartwork
hartwork deleted the 0.4.x-fix-splitting-of-interleaved-stereo branch January 11, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants