[cfe-dev] -fcatch-undefined-behavior false positive with readdir()?

Florian Weimer fweimer at redhat.com
Thu Sep 27 03:00:06 PDT 2012


On 09/27/2012 12:52 AM, Jeffrey Yasskin wrote:

> Note that you can work around this particular bug by using readdir_r()
> with a dirent you allocate correctly.

Please don't do that.  Allocating the buffer is very difficult and 
impossible on some platforms.  Sticking to readdir is much more reasonable.

-- 
Florian Weimer / Red Hat Product Security Team



More information about the cfe-dev mailing list