From: Pavel Shilovsky <piastryyy@gmail.com>
To: Steve French <smfrench@gmail.com>
Cc: David Disseldorp <ddiss@suse.de>,
samba-technical <samba-technical@lists.samba.org>,
CIFS <linux-cifs@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH][smbinfo cifsutils]
Date: Fri, 29 Mar 2019 12:05:55 -0700 [thread overview]
Message-ID: <CAKywueRr0pzHAFHe=RrBqHrak+ZgeT0saPb9FeafJtNJsjhuHw@mail.gmail.com> (raw)
In-Reply-To: <CAH2r5mvyt0rjrtzvZOMeJvHF7FK3LM_pyr7pv2PxzH1n9CxZaQ@mail.gmail.com>
Looks good, thanks.
--
Best regards,
Pavel Shilovsky
пт, 29 мар. 2019 г. в 11:44, Steve French <smfrench@gmail.com>:
>
> Added man page update for this new smbinfo parm
>
>
> On Fri, Mar 29, 2019 at 3:14 AM Steve French <smfrench@gmail.com> wrote:
> >
> > As requested I changed the buffer size malloced to be more obvious -
> > in this case to match exactly what is returned from the first call (ie
> > snapshot length + the sizeof the snapshot info structure which
> > precedes the snapshot list, ie 16 bytes). The snapshot array size is
> > 12 bytes, but rounding it to 8 byte boundary causes the minimum to be
> > 16 bytes.
> >
> > On Thu, Mar 28, 2019 at 11:02 AM David Disseldorp <ddiss@suse.de> wrote:
> > >
> > > On Thu, 28 Mar 2019 05:05:35 -0500, Steve French wrote:
> > >
> > > > + /* Now that we know the size, query the list from the server */
> > > > +
> > > > + /* Make sure the buf size is big enough even to handle unexpected server behavior */
> > > > + buf = malloc(snap_inf.snapshot_array_size + 300);
> > >
> > > The buffer length calculations seem pretty arbitrary here, wouldn't it
> > > make sense to use something like the following (with a maximum limit)?
> > > sizeof(struct smb_snapshot_array) +
> > > (snap_inf.number_of_snapshots * GMT_TOKEN_LEN)
> > >
> > > Cheers, David
> >
> >
> >
> > --
> > Thanks,
> >
> > Steve
>
>
>
> --
> Thanks,
>
> Steve
prev parent reply other threads:[~2019-03-29 19:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-28 10:05 [PATCH][smbinfo cifsutils] Steve French
2019-03-28 10:24 ` ronnie sahlberg
2019-03-28 16:02 ` David Disseldorp
2019-03-29 8:14 ` Steve French
2019-03-29 18:44 ` Steve French
2019-03-29 19:05 ` Pavel Shilovsky [this message]
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='CAKywueRr0pzHAFHe=RrBqHrak+ZgeT0saPb9FeafJtNJsjhuHw@mail.gmail.com' \
--to=piastryyy@gmail.com \
--cc=ddiss@suse.de \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=smfrench@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).