hplip/hplip-logdir.patch

25 lines
1.4 KiB
Diff
Raw Normal View History

2015-03-30 05:53:22 -04:00
diff -up hplip-3.15.2/prnt/hpcups/HPCupsFilter.cpp.logdir hplip-3.15.2/prnt/hpcups/HPCupsFilter.cpp
--- hplip-3.15.2/prnt/hpcups/HPCupsFilter.cpp.logdir 2015-02-04 14:22:43.838774401 +0100
+++ hplip-3.15.2/prnt/hpcups/HPCupsFilter.cpp 2015-02-04 14:22:43.844774315 +0100
@@ -619,7 +619,7 @@ int HPCupsFilter::processRasterData(cups
2014-06-24 15:13:53 +04:00
char hpPreProcessedRasterFile[MAX_FILE_PATH_LEN]; //temp file needed to store raster data with swaped pages.
2013-11-13 16:39:35 +04:00
- sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
2015-03-30 05:53:22 -04:00
+ snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
2013-11-13 16:39:35 +04:00
while (cupsRasterReadHeader2(cups_raster, &cups_header))
2015-03-30 05:53:22 -04:00
diff -up hplip-3.15.2/prnt/hpcups/SystemServices.cpp.logdir hplip-3.15.2/prnt/hpcups/SystemServices.cpp
--- hplip-3.15.2/prnt/hpcups/SystemServices.cpp.logdir 2015-02-04 14:22:43.844774315 +0100
+++ hplip-3.15.2/prnt/hpcups/SystemServices.cpp 2015-02-04 14:24:04.080626127 +0100
@@ -38,7 +38,7 @@ SystemServices::SystemServices(int iLogL
2014-07-10 18:04:19 +04:00
if (iLogLevel & SAVE_OUT_FILE)
{
2014-06-24 15:13:53 +04:00
char fname[MAX_FILE_PATH_LEN];
2014-07-10 18:04:19 +04:00
- sprintf(fname, "%s/hpcups_%s_out_job%d_XXXXXX",CUPS_TMP_DIR, user_name, job_id);
+ snprintf(fname, sizeof(fname), "%s/hpcups_%s_out_job%d_XXXXXX",CUPS_TMP_DIR, user_name, job_id);
2013-11-13 16:39:35 +04:00
createTempFile(fname, &m_fp);
if (m_fp)
2014-07-10 18:04:19 +04:00
{