summaryrefslogtreecommitdiff
path: root/hplip-logdir.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-05 02:45:17 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-05 02:45:17 +0000
commit92ff4cdf8c84e91584dd6076aa5b3c774ab0a622 (patch)
tree6ba01d84d85f00b380477077d920c341c3570b09 /hplip-logdir.patch
parentd8ce4006ffe8011c16c265205aa330c52a0de0c1 (diff)
automatic import of hplipopeneuler24.03_LTS
Diffstat (limited to 'hplip-logdir.patch')
-rw-r--r--hplip-logdir.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/hplip-logdir.patch b/hplip-logdir.patch
new file mode 100644
index 0000000..4b517a5
--- /dev/null
+++ b/hplip-logdir.patch
@@ -0,0 +1,24 @@
+diff -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.logdir hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp
+--- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.logdir 2021-02-19 07:46:48.334843864 +0100
++++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-19 07:48:18.052963216 +0100
+@@ -656,7 +656,7 @@ int HPCupsFilter::processRasterData(cups
+ char hpPreProcessedRasterFile[MAX_FILE_PATH_LEN]; //temp file needed to store raster data with swaped pages.
+
+
+- sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
++ snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
+
+ image_processor_t* imageProcessor=NULL;
+ IMAGE_PROCESSOR_ERROR result;
+diff -up hplip-3.21.2/prnt/hpcups/SystemServices.cpp.logdir hplip-3.21.2/prnt/hpcups/SystemServices.cpp
+--- hplip-3.21.2/prnt/hpcups/SystemServices.cpp.logdir 2021-02-15 00:55:21.000000000 +0100
++++ hplip-3.21.2/prnt/hpcups/SystemServices.cpp 2021-02-19 07:46:48.334843864 +0100
+@@ -38,7 +38,7 @@ SystemServices::SystemServices(int iLogL
+ if (iLogLevel & SAVE_OUT_FILE)
+ {
+ char fname[MAX_FILE_PATH_LEN];
+- 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);
+ createTempFile(fname, &m_fp);
+ if (m_fp)
+ {