Skip to content

Commit

Permalink
Fix incorrectly sized string (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
licornes-fluos authored Sep 25, 2023
1 parent ad945ae commit 9765144
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/io/pwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ core::Result Pwm::setPeriod(const std::uint32_t period, const int period_file)
core::Result Pwm::setPolarity(const Polarity polarity, const int polarity_file)
{
const std::uint8_t polarity_value = static_cast<std::uint8_t>(polarity);
char write_buffer[7];
char write_buffer[9];
if (polarity_value == 0) {
snprintf(write_buffer, sizeof(write_buffer), "normal");
} else {
Expand Down

0 comments on commit 9765144

Please sign in to comment.