The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Tomas Hozza <thozza@redhat.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	devel@linuxdriverproject.org, apw@canonical.com,
	jasowang@redhat.com, kys@microsoft.com
Subject: Re: [PATCH] Tools: hv: Fix for long file names from readdir
Date: Thu, 8 Nov 2012 09:52:43 -0500 (EST)	[thread overview]
Message-ID: <999858348.7901147.1352386363812.JavaMail.root@redhat.com> (raw)
In-Reply-To: <20121108141925.GA20083@aepfle.de>

> > -        char dev_id[256];
> > +        char dev_id[512];
> 
> Shouldnt that be PATH_MAX or similar?

dirent->d_name should be PATH_MAX, but it is mostly 
not guaranteed. And then the dev_id is concatenated
with two strings so it can exceed 256 bytes.

After discussion with K. Y. Srinivasan I just doubled
the size and added size checks for sanity.

Tomas

  reply	other threads:[~2012-11-08 14:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-08 14:13 [PATCH] Tools: hv: Fix for long file names from readdir Tomas Hozza
2012-11-08 14:19 ` Olaf Hering
2012-11-08 14:52   ` Tomas Hozza [this message]
2012-11-08 15:51     ` KY Srinivasan
2012-11-09 12:47       ` Tomas Hozza
2012-11-26 20:43         ` KY Srinivasan

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=999858348.7901147.1352386363812.JavaMail.root@redhat.com \
    --to=thozza@redhat.com \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.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