GNOME Bugzilla – Bug 523019
Use new GCC 4 feature
Last modified: 2008-03-31 04:17:38 UTC
The attached patch from the openSUSE package marks up malloc-style functions so that info about compile-time constant sizes are propagated along with the allocated pointer. This is a new GCC4 feature that allows to detect overflows at compile time
Created attachment 107468 [details] [review] Patch to use the new GCC4 feature
2008-03-30 Matthias Clasen <mclasen@redhat.com> * glib/gmacros.h: Add macros wrapping the gcc alloc_size function attribute. (#523019, Rodrigo Moya) * glib/gmem.h: * glib/gslice.h: * glib/gstrfuncs.h: Use the new attribute where appropriate.