On Tue, Mar 22, 2016 at 11:43:50PM -0700, Chris Cunningham wrote: > Hey Group, > > I'm seeing an interesting pattern [0][1] where we allocate 1 byte in places > where I would expect no allocation to be necessary. Why is this being done? > > [0] https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/mem.c#L136 > [1] > https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/oggparsevorbis.c#L286
to add another reason why malloc(0) _can_ be a problem malloc(0) can return NULL or non NULL whchever way libc prefers this makes reproducing bugreports harder if the developer and user have differening libcs also error checks become more complex if NULL can be a non error return value [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship: All citizens are under surveillance, all their steps and actions recorded, for the politicians to enforce control. Democracy: All politicians are under surveillance, all their steps and actions recorded, for the citizens to enforce control.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel