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

ccan/ciniparser: fix truncation warning #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 9, 2024

  1. ccan/ciniparser: fix truncation warning

    Increase size of tmp buffer to avoid warning:
    
    ```
    ninja: Entering directory `build'
    [1/2] Compiling C object trappist.p/ccan_ccan_ciniparser_ciniparser.c.o
    ../ccan/ccan/ciniparser/ciniparser.c: In function ‘ciniparser_load’:
    ../ccan/ccan/ciniparser/ciniparser.c:443:56: warning: ‘%s’ directive output may be truncated writing up to 1024 bytes into a region of size between 0 and 1024 [-Wformat-truncation=]
      443 |                         snprintf(tmp, sizeof(tmp), "%s:%s", section, key);
          |                                                        ^~            ~~~
    ../ccan/ccan/ciniparser/ciniparser.c:443:25: note: ‘snprintf’ output between 2 and 2050 bytes into a destination of size 1025
      443 |                         snprintf(tmp, sizeof(tmp), "%s:%s", section, key);
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [2/2] Linking target trappist
    ```
    
    Signed-off-by: Johan Malm <[email protected]>
    johanmalm committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    426420c View commit details
    Browse the repository at this point in the history