[MPlayer-dev-eng] [PATCH] mp_msg/printf fixes
dalias at aerifal.cx
Mon Nov 28 18:36:50 CET 2005
On Mon, Nov 28, 2005 at 12:08:43PM +0100, Reimar Döffinger wrote:
> On Sun, Nov 27, 2005 at 07:54:36PM -0500, Rich Felker wrote:
> > On Mon, Nov 28, 2005 at 02:17:12AM +0200, Jan Knutar wrote:
> > > On Monday 28 November 2005 01:28, Dominik 'Rathann' Mierzejewski wrote:
> > > > and uses PRI*64 macros for off_t type.
> > >
> > > Are you sure? The default on Linux is to compile MPlayer with 32 bit off_t,
> > > unless --enable-largefiles is given to configure. See:
> > Yes, this is because glibc is broken and defaults to 32bit....
> > Anyway the correct solution (used elsewhere in mplayer) is to always
> > cast offsets to long long (or maybe int64_t) and then use the PRI*64
> > macros.
> Better cast to int64_t, since there are no printf string macros for long
> long (maybe one day long long will be 128 bit *g*).
> But anyway, you definitly _have_ to add some typecast if you use those
> PRI*64 macros, because if you get it wrong this way it might even cause
> crashed, whereas the other way round at most the values are wrong.
No, either way will cause crash if there is a string (%s) later in the
format, and neither will cause crash as long as there is no %s or %n.
More information about the MPlayer-dev-eng