From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 04 10:45:50 2024 Received: (at submit) by debbugs.gnu.org; 4 Mar 2024 15:45:51 +0000 Received: from localhost ([127.0.0.1]:44514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhAVi-0001OJ-H5 for submit@debbugs.gnu.org; Mon, 04 Mar 2024 10:45:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:40560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhAVf-0001OB-V0 for submit@debbugs.gnu.org; Mon, 04 Mar 2024 10:45:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhAV7-0003gO-SO for bug-coreutils@gnu.org; Mon, 04 Mar 2024 10:45:17 -0500 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhAV4-0001d4-Gd for bug-coreutils@gnu.org; Mon, 04 Mar 2024 10:45:12 -0500 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-42ef1822b07so4739091cf.0 for ; Mon, 04 Mar 2024 07:45:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709567105; x=1710171905; darn=gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jyXa17e/4t9DsFGbopribamwIoyitZpix6ixVwzHp+k=; b=a/RwZ0+DpyrSUjCq4HZ4rej8agddKboaE6Pg27lCp4pDSylIp2PJWxq0XKhoRsfDtW shUwMKizyEsr97f47lWRkoT1IeajRy5sRHYHJdJoA3VY5lfwjpF2yLJiCTJj+TG1EEOI 27bBTB4BcxBWpwKD14ZULGnwtZcfSsM80Ncr2UZCfw4xu7EBS2gB033S8ZpMlVMKmWvl BZukgJaL0/dueHUEpjlSl4skGQ+ud/rQFJr72BRs6seFDO1mxZ87FEGXUBTqfRSqP3vI 6FjCvB7HQtmrfyKnUGugpkBgHoT+pZTkgyYDdnSrvHneXxtvd8+LPwSzh2a1BoV/Kqe+ XIbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709567105; x=1710171905; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jyXa17e/4t9DsFGbopribamwIoyitZpix6ixVwzHp+k=; b=D5fxoxDQUPwd73OStN0txdcv9EzNH3BmHJvo2CweWB7k1TOnOWrEOC+Z4P5cHV86UO Vb17EmsxAMplhSomHHwYOMC06w8h+qAWh4V2BVF+wmxr0L2MMU9LV8rU10VhzA/JXITX 1rL3UisCiWS1fk4HTpeCyLyI7oQkzW99pO11xk+CcjG7sGWodl3s5L2a1xgnaKearBoR iBrt9u0WVeB4C8FNya0TFIdrdjzDeF0JPGY2zq8KxRhVfwjijwYB5/3/g/ZM2djphAzO OpB0TLOsEXaN+ZcS/fHaNP2e3o9CH5l8NkCARD03uy3XXtHUNVSOz4ncZJRyz47UM/Dm wNeg== X-Gm-Message-State: AOJu0Ywxl24TBkye1bCyKG3B19mGxg2lhJej+rorsxFSGLgmosDe2eFr oTRdP1O4whPAqpBAQEuJEU/zLuN9Mt1k4S8VNk63BGMlvCkAK93XlHhjqLze0Pq8C/UygCHjv7O yO0hwgaYoBP3FPjxf9sslsJe2/wagh1Hh5T0= X-Google-Smtp-Source: AGHT+IH5kx77aNHgALFe0M4tBysPBDPpuGnQf2AchXqCIfM+2zWRlZC3xUxJ67thn6+8GaO7sMBSkBuxLGzCU9NVhV8= X-Received: by 2002:a05:622a:182:b0:42e:b2c3:d77a with SMTP id s2-20020a05622a018200b0042eb2c3d77amr10555642qtw.46.1709567105632; Mon, 04 Mar 2024 07:45:05 -0800 (PST) MIME-Version: 1.0 From: Daniel Hofstetter Date: Mon, 4 Mar 2024 16:44:54 +0100 Message-ID: Subject: cksum: inconsistent handling of invalid length values To: bug-coreutils@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=dhofstet@gmail.com; helo=mail-qt1-x82b.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, When specifying an invalid length value followed by a valid length value I get the following error: $ printf "hello" | cksum --algo=3Dblake2b --length=3D12 --length=3D8 cksum: invalid length: =E2=80=9812=E2=80=99 cksum: length is not a multiple of 8 However, if the invalid length value is a multiple of 8 and greater than 512 (the maximum digest length for blake2b), there is no error: $ printf "hello" | cksum --algo=3Dblake2b --length=3D123456 --length=3D8 BLAKE2b-8 (-) =3D 29 I think the behavior should be the same in the two scenarios, whether it's showing an error or ignoring the invalid value. I'm using coreutils 9.4. Regards, Daniel From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 04 11:40:45 2024 Received: (at 69546-done) by debbugs.gnu.org; 4 Mar 2024 16:40:45 +0000 Received: from localhost ([127.0.0.1]:44675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhBMr-00033z-6G for submit@debbugs.gnu.org; Mon, 04 Mar 2024 11:40:45 -0500 Received: from mail-wm1-f43.google.com ([209.85.128.43]:53687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhBMo-00033i-Kq for 69546-done@debbugs.gnu.org; Mon, 04 Mar 2024 11:40:43 -0500 Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-412e9393f47so2647855e9.3 for <69546-done@debbugs.gnu.org>; Mon, 04 Mar 2024 08:40:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709570347; x=1710175147; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=VuB1OBedjbbdhY6Bnsuz9IACRNdf/xKNh0s1aTW2dV4=; b=O0fxwYxJBtKLGMV4Ns/vT8JIeQM+l9UNtneflYrhATNk8f3Dwz6I3/ljhervHIjXkF zMEjxAVr8ciFNJh0nQqTsxK5OrrRJnAHMyWjNmGaV5XEeYCqbYtySLiXxsx0Nh3i0oZm 5rGGgv4nGMRbN5z9rJYsWdc1WZiCXkEdfRZfRtzL2Av+2065By3l8WI8NLlMnI4zTg8a c3S002laogPM3nRJ4vxa3CtTMdCeTAlvoVPWh6ZryorMoQV/4fnjipXEcw8nosLmFHv/ z0c69Is8C1t+8huisZ8GCv4NQmTNGkQJb4XJutah76K2XYrftEfOJ6dVvh9SwJ+FdqM8 o21Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709570347; x=1710175147; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VuB1OBedjbbdhY6Bnsuz9IACRNdf/xKNh0s1aTW2dV4=; b=towJecNeJ8pt61lBtdaQGIpbDOcwy4kBrb4s1BrNIkMIWeupZ02s3IG0f8Y5sKUdrn QN4zFqVhMkjkSvQJIvzo7pr5sxDEVVx+jnCrw9rhCKC3pwcIdyxYSgjXeVuj6kAiMySR RiLlBCySCS6/h+4I/BoUgWDa5LbaUcuxiI98a/VRGe2kNmCBITRayKAqndQyfFqjjJEC mViFJpEDdH/I2a9OFWtjOQygyWCrHK8Lld2CG5d9Dyhd9IJVvEFU6F3s+lJVf78SpNf1 uoTT5+I8OXrBT2eVhgoO5l3NIF0h4vZ1qxLOt/6nDxFUIXFW+7VsBhUx5NOniMw1GXNx lYKg== X-Forwarded-Encrypted: i=1; AJvYcCXi03P4/uBmjIKUVf4Lgs0BDkaClmFRdlqhKfYfTkHAvBqD0fpzBTdd5BxYNaAY6UJo/QtAew9ar1I7OfdH6HTWWmr6IOXveGlKdg== X-Gm-Message-State: AOJu0YxoqfRvMRJre3me8kKcMaY+CqZef9ewD9fusZWs91VZrSL8Q6PL oGutFi0WRd9ypjF1leWY5qbxqqJw6blxIZ9JbekUny/9xCL6PotLgnNowJX0 X-Google-Smtp-Source: AGHT+IF5ebRDl0pzR15MtiD8fXCgj0ib4TYjZKrAsoksrFVV1Vzm/YJtE4pLCAKnuOjo3xGWfuXe1Q== X-Received: by 2002:a05:600c:3508:b0:412:e599:20e8 with SMTP id h8-20020a05600c350800b00412e59920e8mr1404146wmq.22.1709570346883; Mon, 04 Mar 2024 08:39:06 -0800 (PST) Received: from [192.168.1.56] (86-40-129-3-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.40.129.3]) by smtp.googlemail.com with ESMTPSA id g4-20020a05600c4c8400b00412e55c3036sm779081wmp.1.2024.03.04.08.39.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Mar 2024 08:39:06 -0800 (PST) Message-ID: <85c0d54c-d208-6eda-3997-d68e15f93d5d@draigBrady.com> Date: Mon, 4 Mar 2024 16:39:05 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69546: cksum: inconsistent handling of invalid length values Content-Language: en-US To: Daniel Hofstetter , 69546-done@debbugs.gnu.org References: From: =?UTF-8?Q?P=C3=A1draig_Brady?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 69546-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On 04/03/2024 15:44, Daniel Hofstetter wrote: > Hi, > > When specifying an invalid length value followed by a valid length > value I get the following error: > > $ printf "hello" | cksum --algo=blake2b --length=12 --length=8 > cksum: invalid length: ‘12’ > cksum: length is not a multiple of 8 > > However, if the invalid length value is a multiple of 8 and greater > than 512 (the maximum digest length for blake2b), there is no error: > > $ printf "hello" | cksum --algo=blake2b --length=123456 --length=8 > BLAKE2b-8 (-) = 29 > > I think the behavior should be the same in the two scenarios, whether > it's showing an error or ignoring the invalid value. > > I'm using coreutils 9.4. I pushed a fix at: https://github.com/coreutils/coreutils/commit/fea833591 Now only the last used --length is validated. Marking this as done. cheers, Pádraig From unknown Sun Jun 22 17:13:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 02 Apr 2024 11:24:19 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator