lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1628506728.5754343.1355817969825.JavaMail.root@redhat.com>
Date:	Tue, 18 Dec 2012 03:06:09 -0500 (EST)
From:	Tomas Hozza <thozza@...hat.com>
To:	Ben Hutchings <ben@...adent.org.uk>
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, olaf@...fle.de, apw@...onical.com,
	jasowang@...hat.com, kys@...rosoft.com
Subject: Re: [PATCH 1/3] tools/hv: Fix for long file names from readdir

----- Original Message -----
> > This is just for sanity. The value PATH_MAX was chosen after
> > discussion
> > with K. Y. Srinivasan and Olaf Hering instead of some "magic"
> > number like
> > 256 or 512.
> 
> PATH_MAX is a magic name.

It is defined in "limits.h". I would welcome some more constructive
argumentation and critics.

> > > Using snprintf() is a good idea, but you need to check the return
> > > value and handle the truncation case somehow.
> > 
> > By using PATH_MAX sized buffer there is no need for handling the
> > truncation
> > case.
>  
> You are claiming two contradictory things: sprintf() may overrun the
> buffer, so we need the length check provided by snprintf(), but there
> is no need to check for truncation because we know the length is
> sufficient.

So what do you propose? How should it be solved?

Thank you.

Regards,
Tomas Hozza
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists