1 Star 0 Fork 14

lyn/hplip

forked from src-openEuler/hplip 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hplip-logdir.patch 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
jackie_wu123 提交于 2020-02-17 18:58 . package init
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
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);
while (cupsRasterReadHeader2(cups_raster, &cups_header))
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
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)
{
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lyn1001/hplip.git
git@gitee.com:lyn1001/hplip.git
lyn1001
hplip
hplip
master

搜索帮助