Re: [mpg123-users] Do mpg123_distversion and mpg123_libversion really not exist?
Brought to you by:
sobukus
|
From: Martin G. <mar...@gm...> - 2024-11-02 09:11:26
|
On 01/11/24 09:03, Thomas Orgis wrote: > Am Wed, 30 Oct 2024 05:13:55 +0100 > schrieb Martin Guy <mar...@gm...>: >> Instead, both 1.32.7 and 1.32.8 have >> >> #define MPG123_API_VERSION 48 >> /** library patch level at client build time */ >> #define MPG123_PATCHLEVEL 2 > The MPG123_PATCHLEVEL only helps you at build-time, anyway. Build time is fine by me - but can a distributed binary dynamically link against different versions of libmpg123 depending where it lands? It seems that even MPG123_API_VERSION appeared at some point between 1.0.0 and now, and I'm not hacking the configure script to check for the existence of mpg123_*version() so I'm using: + error = mpg123_param(p->handle, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_FORCE_FLOAT + /* Before mpg123-1.32.8 there was a potential exploit for which one workaround + * is to set MPG123_NO_FRANKENSTEIN but there seems to be no way to check + * the exact mpg123 version (mpg123_distversion() is undefined), + * so do this for all versions up to and including the fixed version + * so that in the future this workaround will go away. + * https://mpg123.de/#2024-10-26 + */ +#if !defined(MPG123_API_VERSION) || !defined(MPG123_PATCHLEVEL) || MPG123_API_VERSION < 48 || (MPG123_API_VERSION == 48 && MPG123_PATCHLEVEL <= 2) + | MPG123_NO_FRANKENSTEIN +#endif + , 0); so it should be OK even if PATCHLEVEL++ happens in the far future. > Sorry for the messup. Worry not, old friend. The more you do, the more mistakes you make. You should *see* some of the mistakes I make, and a lot of them embarrassingly public. Fixing a stupid compiler warning with a bracket in the wrong place and making the reverb distort. The test suite caught that before it went public, thank Knuth. The only ones who don't make mistakes are the ones who never do anything Alrighty then M |