[FFmpeg-devel] [FFmpeg-cvslog] lavf: more correct printf format specifiers
Michael Niedermayer
michaelni at gmx.at
Wed Mar 12 00:25:34 CET 2014
On Tue, Mar 11, 2014 at 09:43:15PM +0100, Clément Bœsch wrote:
> On Tue, Mar 11, 2014 at 09:12:06PM +0100, Diego Biurrun wrote:
> > ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Mar 10 15:35:59 2014 +0100| [d92024f18fa3d69937cb2575f3a8bf973df02430] | committer: Diego Biurrun
> >
> > lavf: more correct printf format specifiers
> >
> > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d92024f18fa3d69937cb2575f3a8bf973df02430
> > ---
> >
> > libavformat/apetag.c | 6 ++++--
> > libavformat/asfdec.c | 8 +++++---
> > libavformat/avidec.c | 4 ++--
> > libavformat/bink.c | 10 +++++++---
> > libavformat/cafdec.c | 5 ++++-
> > libavformat/crcenc.c | 4 +++-
> > libavformat/dfa.c | 7 +++++--
> > libavformat/dxa.c | 5 ++++-
> > libavformat/electronicarts.c | 8 +++++---
> > libavformat/framecrcenc.c | 4 +++-
> > libavformat/gxf.c | 6 +++++-
> > libavformat/hnm.c | 11 +++++++----
> > libavformat/iff.c | 4 +++-
> > libavformat/lxfdec.c | 9 ++++++---
> > libavformat/matroskadec.c | 3 ++-
> > libavformat/mov.c | 7 ++++---
> > libavformat/mvi.c | 5 ++++-
> > libavformat/mxfdec.c | 13 ++++++++-----
> > libavformat/omadec.c | 8 +++++---
> > libavformat/rmdec.c | 4 +++-
> > libavformat/rpl.c | 4 ++--
> > libavformat/smacker.c | 8 ++++++--
> > libavformat/smjpegdec.c | 8 +++++---
> > libavformat/spdifenc.c | 8 +++++---
> > libavformat/wtv.c | 6 ++++--
> > libavformat/xmv.c | 6 +++---
> > 26 files changed, 114 insertions(+), 57 deletions(-)
> >
> [...]
> > diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
> > index 28a403a..85e800d 100644
> > --- a/libavformat/asfdec.c
> > +++ b/libavformat/asfdec.c
> > @@ -19,6 +19,8 @@
> > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> > */
> >
> > +#include <inttypes.h>
> > +
> > #include "libavutil/attributes.h"
> > #include "libavutil/avassert.h"
> > #include "libavutil/avstring.h"
> > @@ -921,13 +923,13 @@ static int asf_get_packet(AVFormatContext *s, AVIOContext *pb)
> > // the following checks prevent overflows and infinite loops
> > if (!packet_length || packet_length >= (1U << 29)) {
> > av_log(s, AV_LOG_ERROR,
> > - "invalid packet_length %d at:%"PRId64"\n",
> > + "invalid packet_length %"PRIu32" at:%"PRId64"\n",
> > packet_length, avio_tell(pb));
> > return -1;
> > }
> > if (padsize >= packet_length) {
> > av_log(s, AV_LOG_ERROR,
> > - "invalid padsize %d at:%"PRId64"\n", padsize, avio_tell(pb));
> > + "invalid padsize %"PRIu32" at:%"PRId64"\n", padsize, avio_tell(pb));
> > return -1;
> > }
> >
> > @@ -946,7 +948,7 @@ static int asf_get_packet(AVFormatContext *s, AVIOContext *pb)
> > if (rsize > packet_length - padsize) {
> > asf->packet_size_left = 0;
> > av_log(s, AV_LOG_ERROR,
> > - "invalid packet header length %d for pktlen %d-%d at %"PRId64"\n",
> > + "invalid packet header length %d for pktlen %"PRIu32"-%"PRIu32" at %"PRId64"\n",
>
> rsize is signed
>
> [...]
> > diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
> > index 6950eb2..7966225 100644
> > --- a/libavformat/cafdec.c
> > +++ b/libavformat/cafdec.c
> > @@ -25,6 +25,8 @@
> > * Core Audio Format demuxer
> > */
> >
> > +#include <inttypes.h>
> > +
> > #include "avformat.h"
> > #include "internal.h"
> > #include "isom.h"
> > @@ -289,7 +291,8 @@ static int read_header(AVFormatContext *s)
> >
> > default:
> > #define _(x) ((x) >= ' ' ? (x) : ' ')
> > - av_log(s, AV_LOG_WARNING, "skipping CAF chunk: %08X (%c%c%c%c)\n",
> > + av_log(s, AV_LOG_WARNING,
> > + "skipping CAF chunk: %08"PRIX32" (%"PRIu8"%"PRIu8"%"PRIu8"%"PRIu8")\n",
>
> This is really insane.
+1
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140312/26cd44ed/attachment.asc>
More information about the ffmpeg-devel
mailing list