Skip to content

always use "%s"-style format for printf()-style functions#14

Open
trofi wants to merge 1 commit intoWiimm:masterfrom
trofi:master
Open

always use "%s"-style format for printf()-style functions#14
trofi wants to merge 1 commit intoWiimm:masterfrom
trofi:master

Conversation

@trofi
Copy link

@trofi trofi commented Nov 19, 2021

ncuses-6.3 added printf-style function attributes and now makes
it easier to catch cases when user input is used in palce of format
string when built with CFLAGS=-Werror=format-security:

src/lib-std.c:3623:32: error: format not a string literal and no format arguments [-Werror=format-security]
 3623 |             ERROR0(ERR_WARNING,errmsg);
      |                                ^~~~~~

Let's wrap all the missing places with "%s" format.

`ncuses-6.3` added printf-style function attributes and now makes
it easier to catch cases when user input is used in palce of format
string when built with CFLAGS=-Werror=format-security:

    src/lib-std.c:3623:32: error: format not a string literal and no format arguments [-Werror=format-security]
     3623 |             ERROR0(ERR_WARNING,errmsg);
          |                                ^~~~~~

Let's wrap all the missing places with "%s" format.
@nilp0inter
Copy link

nilp0inter commented Jan 21, 2025

Hi @Wiimm, I am the maintainer of wimms-iso-tools package on NixOS. I'd love to see this PR merged to avoid having to patch the package in nixpkgs.

Thank you for your time!

https://github.com/NixOS/nixpkgs/blob/e1996d7bdaf4eafdb85690079b9e02b25dc14e4f/pkgs/by-name/wi/wiimms-iso-tools/package.nix#L29

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.

2 participants