[flac-dev] [PATCH] for win_utf8_io.c

Erik de Castro Lopo mle+la at mega-nerd.com
Fri Aug 8 20:00:19 PDT 2014


Janne Hyvärinen wrote:

> Some comments for patch #1, I chose the non-secure versions because they 
> are faster and produce smaller binary. The functions where these 
> printings are performed can't in my opinion ever exceed the safety 
> margin of 32 KB. They print short help and error texts and occasionally 
> filename, which with APIs is restricted to 260 characters. And you can't 
> feed it longer faulty names either because maximum command line length 
> is much shorter than 32 KB.

I still like this patch. The secure versions might be slightly slower,
but they are nowhere near the speed critical parts of the FLAC code.
They also *document* the fact that they are safe so you really only
need to look where they are called rather than thinking about maximum
command line lengths and maximum file name lengths.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list