Indeed your suggestion is valid.
I created the following issues:
https://github.com/apache/nuttx/issues/9126
https://github.com/apache/nuttx-apps/issues/1727
On Thu, Apr 27, 2023 at 5:06 AM Nathan Hartman
wrote:
> On Wed, Apr 26, 2023 at 9:32 AM Fotis Panagiotopoulos
> wrote:
> >
> > Hello,
>
On Wed, Apr 26, 2023 at 9:32 AM Fotis Panagiotopoulos
wrote:
>
> Hello,
>
> I fixed all critical usages of asprintf and strdup.
>
> These fixes are in the following PRs:
> https://github.com/apache/nuttx/pull/9009
> https://github.com/apache/nuttx/pull/9010
> https://github.com/apache/nuttx-apps/p
Hello,
I fixed all critical usages of asprintf and strdup.
These fixes are in the following PRs:
https://github.com/apache/nuttx/pull/9009
https://github.com/apache/nuttx/pull/9010
https://github.com/apache/nuttx-apps/pull/1713
The OS itself is now fixed, there should be no other issues pending
On Wed, Mar 29, 2023 at 5:02 AM Fotis Panagiotopoulos
wrote:
> > In my opinion asprintf should set the pointer to NULL, to be safe.
> > But the calling code should probably be changed as well, because it is
> > not a good coding example for portability.
>
> I'm sceptical about this.
> Setting the
strdup() is much better used. Its functionality is simpler, and its
behavior much better understood by most people.
There are only two places with a strdup without checking the result:
gs2200m.c, line 3503
nxffs_pack.c, line 1092
Either the original author forgot it, or it doesn't matter?
There
> strdup?
Thanks, I will check this too.
I went through all the asprintf calls in the list.
These are the ones that actually need to be fixed.
Everything else is properly checked.
drivers/net/telnet.c
698: ret = asprintf(&devpath, TELNET_DEVFMT, priv->td_minor);
libs/libc/uuid/lib_uuid_to_
I can do that. Apart from asprintf() and vasprintf(), is anyone aware of
any other similarly suspicious functions to check?
strdup?
Using ack, these are all uses of asprintf():
drivers/net/telnet.c
698: ret = asprintf(&devpath, TELNET_DEVFMT, priv->td_minor);
libs/libc/uuid/lib_uuid_to_string.c
66: c = asprintf(s,
libs/libc/stdio/lib_tempnam.c
78: asprintf(&template, "%s/%s-XX", dir, pfx);
tools/initialconfig.c
4
> Since, as you point out, this may be a lot of work, I think we should
> try to split the work across several devs...
Yes please, I am beyond burn-out lately...
> To do that, we'd grep for all uses of asprintf() to find out which
> files use it and post that list in reply to this email.
I can d
On Wed, Mar 29, 2023 at 2:14 AM Bernd Walter wrote:
> I think I should open up a ticket for FreeBSD to extend this part in the
> manpage.
> Sounds like a trap - I often just look into the FreeBSD manpages, since this
> is what my desktop runs.
greetings from a FBSD station to a fellow daemon :-)
On Tue, Mar 28, 2023 at 04:28:58PM -0400, Nathan Hartman wrote:
> On Tue, Mar 28, 2023 at 3:43 PM Fotis Panagiotopoulos
> wrote:
> >
> > Hello,
>
> Replying inline below...
>
> > I just noticed that there are some problems with the usage of asprintf()
> > throughout the code base.
> > This funct
On Tue, Mar 28, 2023 at 3:43 PM Fotis Panagiotopoulos
wrote:
>
> Hello,
Replying inline below...
> I just noticed that there are some problems with the usage of asprintf()
> throughout the code base.
> This function is not properly checked for failure, which can lead to nasty
> crashes.
>
> I am
12 matches
Mail list logo