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

bug: some format-overflow warnings #3

Open
RodrigoDornelles opened this issue Sep 6, 2024 · 1 comment
Open

bug: some format-overflow warnings #3

RodrigoDornelles opened this issue Sep 6, 2024 · 1 comment

Comments

@RodrigoDornelles
Copy link
Collaborator

estou trabalhando na #2, e acabei percebendo que existe alguns warnings, posso também corrigilos em mandar em PR a parte. alias qual o estilo de identação seguido? seria GNU?

dvb_resource.c: In function ‘dvbres_listdevices’:
dvb_resource.c:86:29: warning: ‘/frontend0’ directive writing 10 bytes into a region of size between 1 and 128 [-Wformat-overflow=]
   86 |       sprintf(frontname, "%s/frontend0", adaptername);
      |                             ^~~~~~~~~~
dvb_resource.c:86:7: note: ‘sprintf’ output between 11 and 138 bytes into a destination of size 128
   86 |       sprintf(frontname, "%s/frontend0", adaptername);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dvb_resource.c: In function ‘dvbres_open’:
dvb_resource.c:211:29: warning: ‘/frontend0’ directive writing 10 bytes into a region of size between 1 and 64 [-Wformat-overflow=]
  211 |         sprintf(devname, "%s/frontend0", devprefix);
      |                             ^~~~~~~~~~
dvb_resource.c:211:9: note: ‘sprintf’ output between 11 and 74 bytes into a destination of size 64
  211 |         sprintf(devname, "%s/frontend0", devprefix);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dvb_resource.c:185:33: warning: ‘/frontend0’ directive writing 10 bytes into a region of size between 1 and 64 [-Wformat-overflow=]
  185 |             sprintf(devname, "%s/frontend0", devprefix);
      |                                 ^~~~~~~~~~
dvb_resource.c:185:13: note: ‘sprintf’ output between 11 and 74 bytes into a destination of size 64
  185 |             sprintf(devname, "%s/frontend0", devprefix);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dvb_resource.c:318:25: warning: ‘/demux0’ directive writing 7 bytes into a region of size between 1 and 64 [-Wformat-overflow=]
  318 |     sprintf(devname, "%s/demux0", devprefix);
      |                         ^~~~~~~
dvb_resource.c:318:5: note: ‘sprintf’ output between 8 and 71 bytes into a destination of size 64
  318 |     sprintf(devname, "%s/demux0", devprefix);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dvb_resource.c:341:25: warning: ‘/dvr0’ directive writing 5 bytes into a region of size between 1 and 64 [-Wformat-overflow=]
  341 |     sprintf(devname, "%s/dvr0", devprefix);
      |                         ^~~~~
dvb_resource.c:341:5: note: ‘sprintf’ output between 6 and 69 bytes into a destination of size 64
  341 |     sprintf(devname, "%s/dvr0", devprefix);
@RodrigoDornelles
Copy link
Collaborator Author

RodrigoDornelles commented Sep 6, 2024

@rafael2k na real, posso fazer um checkup no projeto, como fazer CI/CD, mover buffers da stack para global, colocar linter, teste de identação, teste de memoria. colocar .gitignore e explicar mais coisas na README.md

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

No branches or pull requests

1 participant