Skip to content

Conversation

evilpete
Copy link
Contributor

@evilpete evilpete commented Jan 5, 2021

bitrow_printf can be called with a length that exceeds the buffer length of b (80 bits) if called with sufficiently large bitbuffer

closes #1597

@@ -81,7 +81,7 @@ static int honeywell_decode(r_device *decoder, bitbuffer_t *bitbuffer)

if (len > 50) { // DW11
if (decoder->verbose)
bitrow_printf(b, len, "%s: ", __func__);
bitrow_printf(b, (len >80 ? 80 : len) , "%s: ", __func__);
Copy link
Collaborator

Choose a reason for hiding this comment

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

A space after the comparison operator, please ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done..

@zuckschwerdt zuckschwerdt merged commit 077dc9f into merbanan:master Jan 5, 2021
@evilpete evilpete deleted the honeywell-buff branch January 5, 2021 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: buffer length error in devices/honeywell.c
2 participants