From nobody Fri Nov 17 15:46:10 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX1TZ6jjnz51655; Fri, 17 Nov 2023 15:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SX1TZ6Fzbz4KHK; Fri, 17 Nov 2023 15:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700235970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DkcBPhSEZdcfnoH6QhtLs+8dlcr86A37Dc+zkK5ExEY=; b=G2vZGukjtmihCBaLNIys+c7XkDiS5JEeczsW/jF27ghvsTZlVbvak2CIjwnOZ7s55dj9cB vohWGMWstQqughEQrmt8zSqZjbKeuPZ8mSc/NmDACEh5pKEglgRPyJyp5mDi0lks8POZg5 ZRZGUP/SdKQ2UNAeuABmDc31UxrHRPzdbQEZE7oF6gtIU75+dD9q2Epouz9ned6S4VqH88 MgJHaZrK18perXLuEFvpS56EcQjb2Rqc8VZXPUwyC+Nqd8/PQH8dXM6VTFpN3E3AH5MbT0 52mkTMORo/KFQ8kBOY9dxCigXt1LRhp0jjsxxD3y9yI+iC5ZY8WDUk8fseBvNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700235970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DkcBPhSEZdcfnoH6QhtLs+8dlcr86A37Dc+zkK5ExEY=; b=cWjHW+PL24mYZxy8fVyKR5ArA/z0KQ6wxfEa1fxnkg1CYuqpHEDAh0JS3omzTIw3k74djf j/6x89K43GvqQxSjsE0HLP34cQtiEYIQlQRffuf2gE/N9V3zb38FWsspVKdVpdkoyotrEP dm4ZeyEsheVjZZ7I9abFrsvtmmnNks1jD33YOQWG78frVj5AOUM5uab4V3tC9L5pljEyrV Kiox5FkN9j5k73k5YNS6qQ2dAkYlCwX1jU1V8YWJHvW0HeR/fsSovTzlmD6iq74OiFEzDO vzVcHev+0ljr+x/f+DDaTgYX+V2YQbmXyGoYR+XUwNYBW1i0mD9H0APMUMxV+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700235970; a=rsa-sha256; cv=none; b=TgX2EBa784wEDRqo3YN+9ZMyGqQoOPjHDDoSl1KtnSPxWwnpXjx936qEv9H7D3nLbisC9n dBefANxAKlXY55b96P4cy5GgeNj6uj1Pt7klNCGSrers6LNP30SfkT3rdYQg2x8l7GcYjk wVlDJzyRXJXS7YGxZZokrtNMZw9fWwDrLEhiLi3EG3W4jyhYzFqbNWKtgcocASTWTi/oc2 5/Uu3yChPnXxqJH8QF3P+NwfhyIeoWIVpL2CnJnbn3lPh9NJyBh6bHhlFMUC0SjqNmZxbH DcxTq4m9cwTsZMvp8+taGUI2AbScroBjuc37CV57rEWUXG80dSzrW35p+KRNyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX1TZ54TFznx4; Fri, 17 Nov 2023 15:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AHFkAug040477; Fri, 17 Nov 2023 15:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHFkAkE040474; Fri, 17 Nov 2023 15:46:10 GMT (envelope-from git) Date: Fri, 17 Nov 2023 15:46:10 GMT Message-Id: <202311171546.3AHFkAkE040474@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Tijl Coosemans Subject: git: 519a7472d666 - main - print/hplip: Fix snprintf calls when device URI contains %20 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tijl X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 519a7472d666302ea47f201a45219ef561f1fe09 Auto-Submitted: auto-generated The branch main has been updated by tijl: URL: https://cgit.FreeBSD.org/ports/commit/?id=519a7472d666302ea47f201a45219ef561f1fe09 commit 519a7472d666302ea47f201a45219ef561f1fe09 Author: Tijl Coosemans AuthorDate: 2023-11-17 14:20:45 +0000 Commit: Tijl Coosemans CommitDate: 2023-11-17 15:44:22 +0000 print/hplip: Fix snprintf calls when device URI contains %20 PR: 270741 --- print/hplip/Makefile | 1 + print/hplip/files/patch-protocol_hp__ipp.c | 46 ++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/print/hplip/Makefile b/print/hplip/Makefile index ef4be4e5a530..0d022ca4609c 100644 --- a/print/hplip/Makefile +++ b/print/hplip/Makefile @@ -1,5 +1,6 @@ PORTNAME= hplip PORTVERSION= 3.23.8 +PORTREVISION= 1 CATEGORIES= print MASTER_SITES= SF diff --git a/print/hplip/files/patch-protocol_hp__ipp.c b/print/hplip/files/patch-protocol_hp__ipp.c new file mode 100644 index 000000000000..f25f08f88867 --- /dev/null +++ b/print/hplip/files/patch-protocol_hp__ipp.c @@ -0,0 +1,46 @@ +--- protocol/hp_ipp.c.orig 2023-09-13 04:07:44 UTC ++++ protocol/hp_ipp.c +@@ -108,9 +108,6 @@ int addCupsPrinter(char *name, char *device_uri, char + goto abort; + } + +- if ( info == NULL ) +- snprintf( info,sizeof(info), name ); +- + sprintf(printer_uri, "ipp://localhost/printers/%s", name); + + cupsSetUser("root"); +@@ -514,27 +511,27 @@ int __parsePrinterAttributes(ipp_t *response, printer_ + + 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 ) {