Update hplip-covscan.patch, because genPCLm.cpp was removed

This commit is contained in:
Zdenek Dohnal 2023-07-28 09:30:06 +02:00
parent 76d7fdfefc
commit e174e9103e

View File

@ -139,43 +139,6 @@ diff -up hplip-3.23.3/pcard/fat.c.covscan hplip-3.23.3/pcard/fat.c
cwd.StartSector = ConvertClusterToSector(fa.StartCluster);
cwd.CurrSector = cwd.StartSector;
cwd.StartCluster = fa.StartCluster;
diff -up hplip-3.23.3/prnt/hpcups/genPCLm.cpp.covscan hplip-3.23.3/prnt/hpcups/genPCLm.cpp
--- hplip-3.23.3/prnt/hpcups/genPCLm.cpp.covscan 2023-03-28 09:26:11.000000000 +0200
+++ hplip-3.23.3/prnt/hpcups/genPCLm.cpp 2023-05-29 13:58:10.971395203 +0200
@@ -1237,11 +1237,16 @@ void PCLmGenerator::writeJobTicket()
char orientation[256];
char duplex[256];
char colorthemes[256];
- strncpy(colorthemes,getColorThemesString(m_pPCLmSSettings->colorTheme),256);
- strncpy(inputBin,getInputBinString(m_pPCLmSSettings->userInputBin),256);
- strncpy(outputBin,getOutputBin(m_pPCLmSSettings->userOutputBin),256);
- strncpy(orientation,getOrientationString(m_pPCLmSSettings->userOrientation),256);
- strncpy(duplex,getDuplexString(currDuplexDisposition),256);
+ strncpy(colorthemes,getColorThemesString(m_pPCLmSSettings->colorTheme), sizeof(colorthemes));
+ colorthemes[sizeof(colorthemes)-1] = '\0';
+ strncpy(inputBin,getInputBinString(m_pPCLmSSettings->userInputBin), sizeof(inputBin));
+ inputBin[sizeof(inputBin)-1] = '\0';
+ strncpy(outputBin,getOutputBin(m_pPCLmSSettings->userOutputBin), sizeof(outputBin));
+ outputBin[sizeof(outputBin)-1] = '\0';
+ strncpy(orientation,getOrientationString(m_pPCLmSSettings->userOrientation), sizeof(orientation));
+ orientation[sizeof(orientation)-1] = '\0';
+ strncpy(duplex,getDuplexString(currDuplexDisposition), sizeof(duplex));
+ duplex[sizeof(duplex)-1] = '\0';
snprintf(pOutStr,OUT_STR_SIZE,"%% genPCLm (Ver: %f)\n",PCLM_Ver); writeStr2OutBuff(pOutStr);
snprintf(pOutStr,OUT_STR_SIZE,"%%============= Job Ticket =============\n"); writeStr2OutBuff(pOutStr);
@@ -1635,7 +1640,10 @@ int PCLmGenerator::StartPage(PCLmPageSe
}
if(strlen(PCLmPageContent->mediaSizeName))
- strncpy(currMediaName,PCLmPageContent->mediaSizeName,256);
+ {
+ strncpy(currMediaName,PCLmPageContent->mediaSizeName, sizeof(currMediaName));
+ currMediaName[sizeof(currMediaName)-1] = '\0';
+ }
currStripHeight=PCLmPageContent->stripHeight;
if(!currStripHeight)
diff -up hplip-3.23.3/prnt/hpijs/context2.cpp.covscan hplip-3.23.3/prnt/hpijs/context2.cpp
--- hplip-3.23.3/prnt/hpijs/context2.cpp.covscan 2023-03-28 09:26:11.000000000 +0200
+++ hplip-3.23.3/prnt/hpijs/context2.cpp 2023-05-29 13:58:10.971395203 +0200