From 9251ff3ad722214ad9608737dd477b4c0b4206a5 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 3 Mar 2014 18:40:00 -0800 Subject: [PATCH] nestegg: ne_parse: normalize size_t usage in calls to ne_read_simple / ne_io_read_skip Change-Id: I5c4fc3bb41832973830ad54248839d6a4944aae6 --- third_party/nestegg/README.webm | 1 + third_party/nestegg/src/nestegg.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/third_party/nestegg/README.webm b/third_party/nestegg/README.webm index ce9a88cad..042f0ff1b 100644 --- a/third_party/nestegg/README.webm +++ b/third_party/nestegg/README.webm @@ -19,3 +19,4 @@ nestegg.c|975 col 6| warning: ‘r’ may be used uninitialized in this function - fix track_scale double->uint64 warning - nestegg_packet_track: fix uint64->uint32 warning - ne_read_(string|binary|block): normalize size_t usage +- ne_parse: normalize size_t usage diff --git a/third_party/nestegg/src/nestegg.c b/third_party/nestegg/src/nestegg.c index 83f3f5fb0..1a263125a 100644 --- a/third_party/nestegg/src/nestegg.c +++ b/third_party/nestegg/src/nestegg.c @@ -1044,7 +1044,7 @@ ne_parse(nestegg * ctx, struct ebml_element_desc * top_level, int64_t max_offset ne_read_single_master(ctx, element); continue; } else { - r = ne_read_simple(ctx, element, size); + r = ne_read_simple(ctx, element, (size_t)size); if (r < 0) break; } @@ -1063,7 +1063,7 @@ ne_parse(nestegg * ctx, struct ebml_element_desc * top_level, int64_t max_offset if (id != ID_VOID && id != ID_CRC32) ctx->log(ctx, NESTEGG_LOG_DEBUG, "unknown element %llx", id); - r = ne_io_read_skip(ctx->io, size); + r = ne_io_read_skip(ctx->io, (size_t)size); if (r != 1) break; }