bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] [RFC] fts: avoid reading beyond the heap allocation


From: Paul Eggert
Subject: Re: [PATCH] [RFC] fts: avoid reading beyond the heap allocation
Date: Wed, 24 Jun 2015 17:03:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Although the Gnulib code workaround is fine, surely it's a bug in GCC 5.1.1, not a bug in Gnulib. I don't see anywhere in the C standard that requires a program to allocate a flexible array size that's rounded to the alignment of the containing structure. Any implicit read is OK, so long as the underlying runtime guarantees alignment of the requested size, which any sane runtime will do. So I suggest filing a bug report with the GCC folks and mentioning the bug number in a comment in lib/fts.c.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]