代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/hplip 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff -up hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp
--- hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp.strncpy 2015-01-21 16:52:44.066497631 +0000
+++ hplip-3.14.10/prnt/hpcups/HPCupsFilter.cpp 2015-01-21 16:59:46.216434376 +0000
@@ -203,6 +203,7 @@ HPCupsFilter::HPCupsFilter() : m_pPrinte
adj_k_width = 0;
black_raster = NULL;
color_raster = NULL;
+ memset (&m_JA, 0, sizeof (m_JA));
}
HPCupsFilter::~HPCupsFilter()
@@ -384,9 +385,9 @@ DRIVER_ERROR HPCupsFilter::startPage (cu
m_JA.media_attributes.physical_height = cups_header->PageSize[1];
m_JA.media_attributes.printable_width = ((cups_header->ImagingBoundingBox[2]-cups_header->ImagingBoundingBox[0]) * horz_res) / 72;
m_JA.media_attributes.printable_height = ((cups_header->ImagingBoundingBox[3]-cups_header->ImagingBoundingBox[1]) * vert_res) / 72;
- strncpy(m_JA.media_attributes.PageSizeName, &cups_header->cupsString[0][0], sizeof(m_JA.media_attributes.PageSizeName));
- strncpy(m_JA.media_attributes.MediaTypeName, cups_header->MediaType, sizeof(m_JA.media_attributes.MediaTypeName));
- strncpy(m_JA.quality_attributes.hbpl1_print_quality, cups_header->OutputType, sizeof(m_JA.quality_attributes.hbpl1_print_quality));
+ strncpy(m_JA.media_attributes.PageSizeName, &cups_header->cupsString[0][0], sizeof(m_JA.media_attributes.PageSizeName)-1);
+ strncpy(m_JA.media_attributes.MediaTypeName, cups_header->MediaType, sizeof(m_JA.media_attributes.MediaTypeName)-1);
+ strncpy(m_JA.quality_attributes.hbpl1_print_quality, cups_header->OutputType, sizeof(m_JA.quality_attributes.hbpl1_print_quality)-1);
m_JA.color_mode = cups_header->cupsRowStep;
}
else {
diff -up hplip-3.14.10/prnt/hpijs/hpijs.cpp.strncpy hplip-3.14.10/prnt/hpijs/hpijs.cpp
--- hplip-3.14.10/prnt/hpijs/hpijs.cpp.strncpy 2015-01-21 17:00:03.225512410 +0000
+++ hplip-3.14.10/prnt/hpijs/hpijs.cpp 2015-01-21 17:04:59.308870785 +0000
@@ -605,7 +605,7 @@ int main (int argc, char *argv[], char *
}
if (argc > 2)
- strncpy(user_name, argv[2], sizeof(user_name));
+ strncpy(user_name, argv[2], sizeof(user_name) - 1);
#ifdef HAVE_LIBHPIP
char *pDev;
diff -up hplip-3.14.10/prnt/hpijs/hpijsfax.cpp.strncpy hplip-3.14.10/prnt/hpijs/hpijsfax.cpp
--- hplip-3.14.10/prnt/hpijs/hpijsfax.cpp.strncpy 2015-01-21 17:05:06.585904171 +0000
+++ hplip-3.14.10/prnt/hpijs/hpijsfax.cpp 2015-01-21 17:05:15.787946389 +0000
@@ -282,7 +282,7 @@ int hpijsFaxServer (int argc, char **arg
char user_name[32]={0,};
if (argc > 2)
- strncpy(user_name, argv[2], sizeof(user_name));
+ strncpy(user_name, argv[2], sizeof(user_name) - 1);
snprintf(hpFileName,sizeof(hpFileName),"%s/hp_%s_ijsfax_Log_XXXXXX",CUPS_TMP_DIR, user_name);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。