extra/hplip to 3.22.6-1

This commit is contained in:
Kevin Mihelich 2022-06-30 12:49:54 +00:00
parent 134e940f37
commit 3ba29c2d83
3 changed files with 54 additions and 19 deletions

View file

@ -1,11 +0,0 @@
--- hplip-3.22.2/scan/sane/bb_ledm.c 2022-02-23 08:41:05.000000000 +0100
+++ hplip-3.22.2/scan/sane/bb_ledm.c.new 2022-03-12 21:10:05.818054984 +0100
@@ -1015,7 +1015,7 @@
c +=11;
char BinaryURL[30];
i = 0;
- while(*c != '<')
+ while(*c != '<' && i < 29)
{
BinaryURL[i++] = *c ;
c++;

View file

@ -0,0 +1,47 @@
--- hplip-3.22.6/protocol/hp_ipp.c 2022-06-28 20:44:38.000000000 +0200
+++ hplip-3.22.6/protocol/hp_ipp.c.new 2022-06-28 20:56:14.336097721 +0200
@@ -110,7 +110,7 @@
}
if ( info == NULL )
- snprintf( info,sizeof(info), name );
+ snprintf( info, sizeof(info), "%s", name );
sprintf( printer_uri, "ipp://localhost/printers/%s", name );
--- hplip-3.22.6/protocol/hp_ipp.c 2022-06-28 21:08:10.000000000 +0200
+++ hplip-3.22.6/protocol/hp_ipp.c.new 2022-06-28 21:14:15.921484059 +0200
@@ -511,27 +511,27 @@
if ( strcmp(attr_name, "printer-name") == 0 &&
val_tag == IPP_TAG_NAME ) {
- snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) );
+ snprintf(t_printer->name, sizeof(t_printer->name), "%s", ippGetString(attr, 0, NULL) );
}
else if ( strcmp(attr_name, "device-uri") == 0 &&
val_tag == IPP_TAG_URI ) {
- snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) );
+ snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), "%s", ippGetString(attr, 0, NULL) );
}
else if ( strcmp(attr_name, "printer-uri-supported") == 0 &&
val_tag == IPP_TAG_URI ) {
- snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) );
+ snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), "%s", ippGetString(attr, 0, NULL) );
}
else if ( strcmp(attr_name, "printer-info") == 0 &&
val_tag == IPP_TAG_TEXT ) {
- snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) );
+ snprintf(t_printer->info,sizeof(t_printer->info), "%s", ippGetString(attr, 0, NULL) );
}
else if ( strcmp(attr_name, "printer-location") == 0 &&
val_tag == IPP_TAG_TEXT ) {
- snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) );
+ snprintf(t_printer->location,sizeof(t_printer->location),"%s", ippGetString(attr, 0, NULL) );
}
else if ( strcmp(attr_name, "printer-make-and-model") == 0 &&
val_tag == IPP_TAG_TEXT ) {
- snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) );
+ snprintf(t_printer->make_model,sizeof(t_printer->make_model),"%s", ippGetString(attr, 0, NULL) );
}
else if ( strcmp(attr_name, "printer-state") == 0 &&
val_tag == IPP_TAG_ENUM ) {

View file

@ -7,8 +7,8 @@
# - patch to remove x86-only ImageProcessor
pkgname=hplip
pkgver=3.22.4
pkgrel=2
pkgver=3.22.6
pkgrel=1
epoch=1
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
arch=('x86_64')
@ -32,18 +32,18 @@ source=(https://downloads.sourceforge.net/${pkgname}/$pkgname-$pkgver.tar.gz{,.a
0003-models.dat-Re-add-drivers-missing-from-3.19.1.patch
0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
0024-fix-possible-stack-buffer.overflows.patch
0025_fix-Werror-format-security.patch
0001-Remove-ImageProcessor.patch
# use the one from Fedora
hplip-configure-python.patch
python3.diff
reproducible-gzip.patch)
sha512sums=('8c71a7c87b8e6203dbd9c7d86fc3b926474046c69f00fae1e0f87e057f17ff17184b3c4f8b8d4c14495208b21990cbc1acb08c36d96c96749ab1707922c31923'
sha512sums=('cb25c07c767d3d8921468429ef154401a4df9d2fdf87ead3ab18f0d06e1bd3de610843b8131641a1af8d920c7e15e290a0923405bf609cdc0a3fba9df93ddb5e'
'SKIP'
'ee0bd240568a7dbb4dc6ef64dba28ea84c4bedf7d688d054960c686666f8f0bc4562961c40845107ef0c936e60d3e676bffb2a1ba708039690bb0520cda3a525'
'f79b3f09d022178099f38b9eae1792396e730eb5352a03d088e6610d92b3895f3f65bb92089ce7f5b21d794f9716ceb176d29ca7283e8a48bb04cf6aba305a2f'
'22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67'
'460f4447faf688981bafebda71b0f144e662368ad87e944cb01834750ae133b1aad2a1c50e6ee168adf972cfe04ca0857da6ff1124d176f93c342f2a1273b962'
'b7e67bccb2516f4d98e4c5ea55f7d2299d95bfdc341dbc0149af1423169bedcd8bcfdb125c92f373e9e7be57ea284fef80a8343035fb42572b9cb927929cd257'
'763949a0bc460dcc9faefc86f2a91cf342781bfce696ed0c3826758572dd03ac266bbeb7b6a4f9376ac298d7d3c9c4def42d94921a8e1d1695e39396e36d95ff'
'7f402ed13341ac9a01f28ecdb97effcd15f5fa9d123e554d4dd78e9f5ed01bcf7b4fe7400c53ddf5e7068f9ffd858d8fefe060e2fcacea0a0524145d78e315cc'
'089c102357ea5fd55d81ae76aaff62713f780fd84500c3b92ecd6b2bb11ccdc3a162978548e9a5f9e98a8354a5be3997e416c52daa18eda4621ed79a29d6fea8'
@ -60,8 +60,6 @@ prepare() {
patch -Np1 -i "${srcdir}"/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
# fix some handling unicode file names FS#58412
patch -Np1 -i "${srcdir}"/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
# address possible stack buffer overflows - FS#48112 / https://bugs.launchpad.net/hplip/+bug/1544099
patch -Np1 -i "${srcdir}"/0024-fix-possible-stack-buffer.overflows.patch
# Workaround patch for missing Python3 transition of the old
# (pre-USB-storage) photo memory card support (pcardext) - Debian patch
# fix model support / Debian patch / FS#74942
@ -69,7 +67,8 @@ prepare() {
patch -Np1 -i "${srcdir}"/python3.diff
# remove imageprocessor
patch -Np1 -i "${srcdir}"/0001-Remove-ImageProcessor.patch
# fix -Werror=format-security build error with gcc 12
patch -Np1 -i "${srcdir}"/0025_fix-Werror-format-security.patch
# https://bugs.launchpad.net/hplip/+bug/1879445
# broken scanning - https://bugs.archlinux.org/task/66704
patch -Np1 -i ../hplip-configure-python.patch