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

Fix buffer overflow in LCD_disp_str #245

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Nov 17, 2023

  1. lcd.c : Fix reboot with too long string

    The probleme occur when right tc offet is >= 10.00 or <=-10.00
    or when version string is more than 21 char as v0.5.2-4-dirty-gxxxxxx.
    This cause reboot of the firmware.
    
    The buffer overflow is triggered when trying to print the null char at
    the end of the string.
    
    note from snprintf(3) :
    snprintf return the return value is the number of characters (excluding the terminating null byte) which would have  been
    written  to the final string if enough space had been available.
    mcapdeville committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    71a5b4d View commit details
    Browse the repository at this point in the history
  2. Set maximum tc offset to +-62°C

    Tc Offset can be adjusted to +-62.5°C.
    To fit in unsigned char, precision is reduce to 0.5°C
    mcapdeville committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    c84d816 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8c91cbe View commit details
    Browse the repository at this point in the history