Re: [PATCH] telemetry: avoid truncation of strlcpy return before check

2024-02-01 Thread Tyler Retzlaff
On Thu, Feb 01, 2024 at 12:45:43PM +0100, David Marchand wrote: > On Tue, Aug 8, 2023 at 8:35 PM Bruce Richardson > wrote: > > > > On Tue, Aug 08, 2023 at 10:59:37AM -0700, Tyler Retzlaff wrote: > > > On Tue, Aug 08, 2023 at 10:24:41AM +0800, lihuisong (C) wrote: > > > > > > > > 在 2023/8/3 5:21, T

Re: [PATCH] telemetry: avoid truncation of strlcpy return before check

2024-02-01 Thread David Marchand
On Tue, Aug 8, 2023 at 8:35 PM Bruce Richardson wrote: > > On Tue, Aug 08, 2023 at 10:59:37AM -0700, Tyler Retzlaff wrote: > > On Tue, Aug 08, 2023 at 10:24:41AM +0800, lihuisong (C) wrote: > > > > > > 在 2023/8/3 5:21, Tyler Retzlaff 写道: > > > >strlcpy returns type size_t when directly assigning t

Re: [PATCH] telemetry: avoid truncation of strlcpy return before check

2023-08-08 Thread Bruce Richardson
On Tue, Aug 08, 2023 at 10:59:37AM -0700, Tyler Retzlaff wrote: > On Tue, Aug 08, 2023 at 10:24:41AM +0800, lihuisong (C) wrote: > > > > 在 2023/8/3 5:21, Tyler Retzlaff 写道: > > >strlcpy returns type size_t when directly assigning to > > >struct rte_tel_data data_len field it may be truncated leadi

Re: [PATCH] telemetry: avoid truncation of strlcpy return before check

2023-08-08 Thread Tyler Retzlaff
On Tue, Aug 08, 2023 at 10:24:41AM +0800, lihuisong (C) wrote: > > 在 2023/8/3 5:21, Tyler Retzlaff 写道: > >strlcpy returns type size_t when directly assigning to > >struct rte_tel_data data_len field it may be truncated leading to > >compromised length check that follows > > > >Since the limit in t

Re: [PATCH] telemetry: avoid truncation of strlcpy return before check

2023-08-07 Thread lihuisong (C)
在 2023/8/3 5:21, Tyler Retzlaff 写道: strlcpy returns type size_t when directly assigning to struct rte_tel_data data_len field it may be truncated leading to compromised length check that follows Since the limit in the check is < UINT_MAX the value returned is safe to be cast to unsigned int (w

Re: [PATCH] telemetry: avoid truncation of strlcpy return before check

2023-08-03 Thread Bruce Richardson
On Wed, Aug 02, 2023 at 02:21:01PM -0700, Tyler Retzlaff wrote: > strlcpy returns type size_t when directly assigning to > struct rte_tel_data data_len field it may be truncated leading to > compromised length check that follows > > Since the limit in the check is < UINT_MAX the value returned is

[PATCH] telemetry: avoid truncation of strlcpy return before check

2023-08-02 Thread Tyler Retzlaff
strlcpy returns type size_t when directly assigning to struct rte_tel_data data_len field it may be truncated leading to compromised length check that follows Since the limit in the check is < UINT_MAX the value returned is safe to be cast to unsigned int (which may be narrower than size_t) but on