On Mon, Jan 26, 2026 at 02:53:36PM +0100, Marco Felsch wrote:
> Hi Sascha,
> 
> On 26-01-26, Sascha Hauer wrote:
> 
> ..
> > While at it use a define for the maximum answer length to avoid
> > repeating the hardcoded number. Also allow the answer to be exactly
> > the maximum length. Previous implementation used a 64 byte string
> > which included the '\0' string end and limited the usable size to
> > 63 bytes. Now we can use the full 256 bytes.
> 
> ...
> 
> > +#define FASTBOOT_MAX_RESPONSE_SIZE 256
> > +
> >  int fastboot_tx_print(struct fastboot *fb, enum fastboot_msg_type type,
> >                   const char *fmt, ...)
> >  {
> >     struct va_format vaf;
> > -   char buf[64];
> > +   char buf[FASTBOOT_MAX_RESPONSE_SIZE + 1];
> 
> So the new size of 256 bytes don't include the '\0' at the end?

We need the '\0' for printing the string with pr_info(), but it doesn't
go over the wire.

> 
> In that case feel free to add my:
> 
> Reviewed-by: Marco Felsch <[email protected]>

Thanks
 Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to