From nobody Sun Feb 22 07:16:21 2026 X-Original-To: riscv@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 4fJZz92lDNz6SBKC for ; Sun, 22 Feb 2026 07:16:21 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fJZz92FJsz3yfv for ; Sun, 22 Feb 2026 07:16:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771744581; 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=auIipV1WLTlBZDwjBKGch3jf0YwVHt1hKfeCnD20tJI=; b=ESlKH/idcmEZJIcUugrHC2KGyGT43s2WU2pbj/n0u++Pyu1FtuwJvL/X/9F8xB5/szWbUp zNTM0DxVOVHxeKXW4og644S483aVOgZdhEWynrPU91Chh1+VMwUTeKNkKMDFn7DD7BXghe RIOjGC80sxPfHy14q5P5fuViX1NJQ6ahp6SDRjxPIk3iE/8j5odXophhTVB8qLEn4iDXeq RhplBWhoK7A3EFo36K9Ea2hBH1SwzRdRlEKB/cb7Wi/odXXYcfiLDBw0kUWdfseMPToLyk ioCY/3hUXArGcMCYpUuodube9uZUEwpB9chdPPD60WTg2r6IPQpDdTLSR2SsEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771744581; a=rsa-sha256; cv=none; b=NQGnH32qm9YwL8n/NUTSXz184w0Iq5Iw9oTI+0e5ZfbWo74dEMZVyJCxBTRFjMaU6Ds6dq mYUnj0IA8G/fZZir06I0NssaRnZsMn+jB2XkkmvPrmaqcc437y9Im12cYfR1Cl6ZowU+T9 ZIDqo1M9sjrbpYtOQv0BB/fk1afYrpiRG6g5Z+gdnarIdHgXJWMn0LCg7MR5k13s55/1b6 Z0+m/PGGtkWxnTkR0uvhrgaMoPkfUT+o2NfpopLx5ZWgyDKxWb6YkmkSidpMGjQHj2/+JR W/dh+YMIV7aWYIhZyiXdHCoFvXI1aLA3Vw4GwAO1KezVvJiTRRhUih6pZlgvzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771744581; 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=auIipV1WLTlBZDwjBKGch3jf0YwVHt1hKfeCnD20tJI=; b=AjQ0JIDUQE2T4P2bFcsUT79sKP3V4b7oVQTZFJziyUPmhMaxwXUfFfjLkRmEI1Km0uV3ti CYr6Iye+hcn1WPQZB3h3pnDpQdKtfD9WBvfBRiGE69myfHym3qPJutgdNJFPxArpGuHrIz wybStVDWJctZWPr91LAHaWas6pKkSKa5kzfurUv4wHFvuKL2zEr3X4JlatjCvNvHrXcChY XujJ9a/3RWNVo7GwCBb5s7wc4pOY0359+50ox9Px8Q9PDSX2fwEmpK34VgQBRzaqVcliZj Sw7ArF7Xhc4dG4BRmQfFboHIO89bKS/yZudHRzqbN1ELGoabNInjAdx4q2EwVg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4fJZz91nWZzZvd for ; Sun, 22 Feb 2026 07:16:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 61M7GLvU078529 for ; Sun, 22 Feb 2026 07:16:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 61M7GLKb078528 for riscv@FreeBSD.org; Sun, 22 Feb 2026 07:16:21 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: riscv@FreeBSD.org Subject: [Bug 293353] No overflow handling in the strnlen function Date: Sun, 22 Feb 2026 07:16:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: riscv X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: maxim.like.python@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: riscv@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD on the RISC-V instruction set architecture List-Archive: https://lists.freebsd.org/archives/freebsd-riscv List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-riscv@freebsd.org Sender: owner-freebsd-riscv@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D293353 Bug ID: 293353 Summary: No overflow handling in the strnlen function Product: Base System Version: Unspecified Hardware: riscv OS: Any Status: New Severity: Affects Some People Priority: --- Component: riscv Assignee: riscv@FreeBSD.org Reporter: maxim.like.python@gmail.com I found that there is no overflow check in the strnlen function. In the code that I was trying to run, there is a strnlen(buf, MAX_SIZE_T) expression, t= he result of which on riscv differs from other architectures. After looking at the strnlen assembly code, the lack of overflow handling became apparent. --=20 You are receiving this mail because: You are the assignee for the bug.=