Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 30 Mar 2023 16:14:52 +0800
From: Matthias Görgens <matthias.goergens@...il.com>
To: Matthias Goergens <matthias.goergens@...il.com>, musl@...ts.openwall.com
Subject: Re: [PATCH] mntent: deal with escaped whitespace in mtab and fstab

On Thu, 30 Mar 2023, 01:16 Szabolcs Nagy, <nsz@...t70.net> wrote:
>
> * Szabolcs Nagy <nsz@...t70.net> [2023-03-29 19:04:18 +0200]:
> > > -   return fprintf(f, "%s\t%s\t%s\t%s\t%d\t%d\n",
> > > -           mnt->mnt_fsname, mnt->mnt_dir, mnt->mnt_type, mnt->mnt_opts,
> > > -           mnt->mnt_freq, mnt->mnt_passno) < 0;
> >
> > the original code has a bug here: fprintf returns number of
> > chars printed but addmntent returns 0 to indicate success.
>
> sorry missed the < 0.

I made that exact same error when first reading the code.  I wonder whether we
should put the zero in front, to make it clearer to readers? Like `0 >
fprintf(...`

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.