diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-26 16:12:18 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-26 16:12:18 +0200 |
| commit | 2ffd4e4f1af16b17a286ff354603a717f5d828a5 (patch) | |
| tree | 99e2d4a7e2fde8e3abb027eb687901440750ee00 /src/drivers/PostScript/Fl_PostScript.cxx | |
| parent | 53d9614adbb728fc4db983c9bb817c6eea870994 (diff) | |
Replace all calls to sprintf() by calls to snprintf().
Diffstat (limited to 'src/drivers/PostScript/Fl_PostScript.cxx')
| -rw-r--r-- | src/drivers/PostScript/Fl_PostScript.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx index 8b6dfea9b..0022412e5 100644 --- a/src/drivers/PostScript/Fl_PostScript.cxx +++ b/src/drivers/PostScript/Fl_PostScript.cxx @@ -1503,7 +1503,7 @@ int Fl_PostScript_Graphics_Driver::start_postscript(int pagecount, if (!cairo_) return 1; nPages=0; char feature[250]; - sprintf(feature, "%%%%BeginFeature: *PageSize %s\n<</PageSize[%d %d]>>setpagedevice\n%%%%EndFeature", + snprintf(feature, 250, "%%%%BeginFeature: *PageSize %s\n<</PageSize[%d %d]>>setpagedevice\n%%%%EndFeature", Fl_Paged_Device::page_formats[format].name, Fl_Paged_Device::page_formats[format].width, Fl_Paged_Device::page_formats[format].height); cairo_ps_surface_dsc_comment(cairo_get_target(cairo_), feature); return 0; @@ -1635,7 +1635,7 @@ int Fl_PostScript_File_Device::begin_page (void) #if USE_PANGO cairo_ps_surface_dsc_begin_page_setup(cairo_get_target(ps->cr())); char feature[200]; - sprintf(feature, "%%%%PageOrientation: %s", ps->pw_ > ps->ph_ ? "Landscape" : "Portrait"); + snprintf(feature, 200, "%%%%PageOrientation: %s", ps->pw_ > ps->ph_ ? "Landscape" : "Portrait"); cairo_ps_surface_dsc_comment(cairo_get_target(ps->cr()), feature); if (ps->pw_ > ps->ph_) { cairo_translate(ps->cr(), 0, ps->pw_); |
