All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nithurshen <nithurshen.dev@gmail.com>
To: hsiangkao@linux.alibaba.com
Cc: linux-erofs@lists.ozlabs.org, nithurshen.dev@gmail.com, xiang@kernel.org
Subject: [PATCH 2/2] erofs-utils: libzstd: fix undefined behavior shift in setdictsize
Date: Mon, 20 Apr 2026 08:20:23 +0530	[thread overview]
Message-ID: <20260420025023.11802-1-nithurshen.dev@gmail.com> (raw)
In-Reply-To: <00f14a87-6914-4e4a-96f1-6d0f911edc4d@linux.alibaba.com>

Hi Xiang,

I do agree that `pclustersize_max` is always greater than 0 and
`ondisk_extradevs` is at max 65535.

My intent was to look at these functions as independent blocks.
Even though the current upstream callers provide safe inputs, I
wanted to make them robust against any undefined behavior in case
they are reused in the future.

Thanks,
Nithurshen

Regards,
Nithurshen


  reply	other threads:[~2026-04-20  2:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-19 13:16 [PATCH 1/2] erofs-utils: fix undefined behavior shift in erofs_init_devices Nithurshen
2026-04-19 13:16 ` [PATCH 2/2] erofs-utils: libzstd: fix undefined behavior shift in setdictsize Nithurshen
2026-04-20  1:54   ` Gao Xiang
2026-04-20  1:52 ` [PATCH 1/2] erofs-utils: fix undefined behavior shift in erofs_init_devices Gao Xiang
2026-04-20  2:50   ` Nithurshen [this message]
2026-04-20  2:57     ` [PATCH 2/2] erofs-utils: libzstd: fix undefined behavior shift in setdictsize Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260420025023.11802-1-nithurshen.dev@gmail.com \
    --to=nithurshen.dev@gmail.com \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=xiang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.