Skip to content

Commit

Permalink
Fixed issue with the use of snprintf that was causing problems printing.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtsoliday committed Jun 21, 2024
1 parent 74c6a52 commit d4b7152
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions printUtils/utilPrint.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int utilPrint(Display *display, Widget w, char *xwdFileName, char *title)
break;
case PRINT_TITLE_SPECIFIED:
if(*printTitleString) {
snprintf(titleString, sizeof(titleString), "-s%s", printTitleString);
snprintf(titleString, PRINT_BUF_SIZE, "-s%s", printTitleString);
myArgv[myArgc++] = titleString;
}
break;
Expand Down Expand Up @@ -194,7 +194,7 @@ int utilPrint(Display *display, Widget w, char *xwdFileName, char *title)
} else {
/* Print the file to the printer, unless you are debugging, in
which case you can look at the files instead */
snprintf(commandBuffer, sizeof(commandBuffer), "%s %s", printCommand, psFileName);
snprintf(commandBuffer, PRINT_BUF_SIZE, "%s %s", printCommand, psFileName);
status=system(commandBuffer);
#ifndef VMS
if(status) {
Expand Down

0 comments on commit d4b7152

Please sign in to comment.