All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vyacheslav Dubeyko <slava@dubeyko.com>
To: sougata santra <sougata@tuxera.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Joe Perches <joe@perches.com>, Christoph Hellwig <hch@lst.de>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] hfsplus: fix longname handling
Date: Tue, 25 Feb 2014 14:16:19 +0400	[thread overview]
Message-ID: <1393323379.2233.13.camel@slavad-CELSIUS-H720> (raw)
In-Reply-To: <530C6AD5.90905@tuxera.com>

On Tue, 2014-02-25 at 12:05 +0200, sougata santra wrote:

> 		return err;
> >> +
> >> +	len = be16_to_cpu(key->cat.name.length);
> >>   	key->key_len = cpu_to_be16(6 + 2 * len);
> >
> > I think that maybe it is time to change hardcoded 6 on sensible named
> > constant. What do you think?
> 
> I agree, although I think this should he done in a separate patch. Also 
> there are other instances of hard-coding. We can clean them with a patch. ?
> 

Yes, I think so too. It will be great.

> >   62
> >   63         ustrlen = be16_to_cpu(name->length);
> >
> > I suppose that it makes sense to check name->length here and return
> > error. We can check possible volume corruption here.
> 
> I looked into it while writing the patch. I think this was already 
> handled before. Please see. catalog.c#hfsplus_find_cat the only place it 
> is called.
> 
> {code}
>          if (be16_to_cpu(tmp.thread.nodeName.length) > 255) {
>                  pr_err("catalog name length corrupted\n");
>                  return -EIO;
>          }
> {code}
> 

OK. I agree that my suggestion is not necessary.

Thanks,
Vyacheslav Dubeyko.



      reply	other threads:[~2014-02-25 10:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 19:28 [PATCH 1/1] hfsplus: fix longname handling Sougata Santra
2014-02-24 21:48 ` Andrew Morton
2014-02-25 18:01   ` sougata
2014-02-25 19:54     ` Christoph Hellwig
2014-02-25  7:37 ` Vyacheslav Dubeyko
2014-02-25 10:05   ` sougata santra
2014-02-25 10:16     ` Vyacheslav Dubeyko [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=1393323379.2233.13.camel@slavad-CELSIUS-H720 \
    --to=slava@dubeyko.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=joe@perches.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sougata@tuxera.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.