Skip to content

Commit

Permalink
alsactl: fix potential buffer overwrite
Browse files Browse the repository at this point in the history
The 'call to sprintf' operation on line 413 requires 21 bytes
but the destination is only 16 bytes.

Fixes: #247
Signed-off-by: Mingjie Shen <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
szsam authored and perexg committed Dec 8, 2023
1 parent 8f3d84b commit 004d085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alsactl/alsactl.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ int main(int argc, char *argv[])
char *cfgfile = SYS_ASOUNDRC;
char *initfile = DATADIR "/init/00main";
char *pidfile = SYS_PIDFILE;
char *cardname, ncardname[16];
char *cardname, ncardname[21];
char *cmd;
char *const *extra_args;
const char *const *tmp;
Expand Down

0 comments on commit 004d085

Please sign in to comment.