public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Daniel Mentz <danielmentz@google.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tomas Winkler <tomas.winkler@intel.com>,
	Avri Altman <avri.altman@wdc.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Mars Cheng <marscheng@google.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Yen-lin Lai <yenlinlai@google.com>
Subject: Re: [PATCH] scsi: ufs: Leave space for '\0' in utf8 desc string
Date: Tue, 24 Oct 2023 22:46:47 -0400	[thread overview]
Message-ID: <yq1msw7ctbi.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20231017182026.2141163-1-danielmentz@google.com> (Daniel Mentz's message of "Tue, 17 Oct 2023 11:20:26 -0700")


Daniel,

> utf16s_to_utf8s does not NULL terminate the output string. For us to be
> able to add a NULL character when utf16s_to_utf8s returns, we need to
> make sure that there is space for such NULL character at the end of the
> output buffer. We can achieve this by passing an output buffer size to
> utf16s_to_utf8s that is one character less than what we allocated.

Applied to 6.7/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

      parent reply	other threads:[~2023-10-25  2:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 18:20 [PATCH] scsi: ufs: Leave space for '\0' in utf8 desc string Daniel Mentz
2023-10-17 19:20 ` Avri Altman
2023-10-17 19:33   ` Bart Van Assche
2023-10-17 21:56     ` Daniel Mentz
2023-10-25  2:46 ` Martin K. Petersen [this message]

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=yq1msw7ctbi.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=danielmentz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=marscheng@google.com \
    --cc=tomas.winkler@intel.com \
    --cc=yenlinlai@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox