From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb gadget: increase envstr size in cb_getvar
Date: Fri, 3 Mar 2017 13:26:24 +0100 [thread overview]
Message-ID: <20170303132624.2cf76d48@jawa> (raw)
In-Reply-To: <CAJZhe_gYy70asArq8J=U0F0nfnWp7WeqQGE5GGSVhwjqKcR4wQ@mail.gmail.com>
Hi Nicolas,
+Marek on CC
> Hi,
>
> would it be possible to consider this patch please?
>
> Best Regards
> Nicolas
>
> 2016-09-21 10:43 GMT+02:00 Nicolas le bayon <nlebayon@gmail.com>:
>
> > Hi,
> >
> > I propose you this patch in order to take into account strings
> > larger than actual size (32). I recently faced to
> > 'fastboot.partition-type:userdata' (it was in Android context) but
> > this could be the case for other purposes.
> >
> > I propose to simply double the size. Is it ok for you?
> >
> > Regards
> >
> > ---
> > drivers/usb/gadget/f_fastboot.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_
> > fastboot.c
> > index 2160b1c..84e22e4 100644
> > --- a/drivers/usb/gadget/f_fastboot.c
> > +++ b/drivers/usb/gadget/f_fastboot.c
> > @@ -432,7 +432,7 @@ static void cb_getvar(struct usb_ep *ep, struct
> > usb_request *req)
> > else
> > strcpy(response, "FAILValue not set");
> > } else {
> > - char envstr[32];
> > + char envstr[64];
> >
> > snprintf(envstr, sizeof(envstr) - 1, "fastboot.%s", cmd);
> > s = getenv(envstr);
> > --
> > 1.9.1
> >
> >
> >
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/listinfo/u-boot
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
next prev parent reply other threads:[~2017-03-03 12:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 8:43 [U-Boot] [PATCH] usb gadget: increase envstr size in cb_getvar Nicolas le bayon
2017-03-03 10:40 ` Nicolas le bayon
2017-03-03 12:26 ` Lukasz Majewski [this message]
2017-03-05 0:54 ` Marek Vasut
2017-03-10 9:45 ` Nicolas le bayon
2017-03-10 9:58 ` Marek Vasut
2017-03-10 9:59 ` Marek Vasut
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=20170303132624.2cf76d48@jawa \
--to=lukma@denx.de \
--cc=u-boot@lists.denx.de \
/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