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 overflow #2

Closed
wants to merge 1 commit into from
Closed

fix overflow #2

wants to merge 1 commit into from

Conversation

ianare
Copy link

@ianare ianare commented Aug 22, 2019

fix for warning:

pdf_print.cc:1223:6: warning: ‘sprintf’ writing a terminating nul past the end of the destination [-Wformat-overflow=]
 void pdf_print::file_xref()
      ^~~~~~~~~
pdf_print.cc:1238:13: note: ‘sprintf’ output between 21 and 28 bytes into a destination of size 20
     sprintf (tstring, "%010d %05d %c \n", u->byte_offset, u->generation, u->use);
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@mandovinnie
Copy link
Owner

mandovinnie commented Aug 22, 2019 via email

@mandovinnie
Copy link
Owner

mandovinnie commented Aug 22, 2019 via email

@ianare
Copy link
Author

ianare commented Aug 22, 2019

No not using PDF output, this is just a compiler warning. The program runs fine on the included samples.

@ianare ianare closed this Aug 23, 2019
@ianare ianare deleted the fix-overflow branch August 23, 2019 13:38
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