[libdvdnav-devel] ifo_read: use info_length as size_t

Jean-Baptiste Kempf git at videolan.org
Sun Dec 29 19:25:25 CET 2013


libdvdread | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Dec 29 19:23:29 2013 +0100| [ee24a03767f4b332b6a3943806a4398937d71a2f] | committer: Jean-Baptiste Kempf

ifo_read: use info_length as size_t

And kill a warning

> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=ee24a03767f4b332b6a3943806a4398937d71a2f
---

 src/ifo_read.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ifo_read.c b/src/ifo_read.c
index 0ba5eed..b9c88ef 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -1029,7 +1029,8 @@ void ifoFree_FP_PGC(ifo_handle_t *ifofile) {
 
 int ifoRead_TT_SRPT(ifo_handle_t *ifofile) {
   tt_srpt_t *tt_srpt;
-  int i, info_length;
+  unsigned int i;
+  size_t info_length;
 
   if(!ifofile)
     return 0;
@@ -1088,7 +1089,7 @@ int ifoRead_TT_SRPT(ifo_handle_t *ifofile) {
   CHECK_ZERO(tt_srpt->zero_1);
   CHECK_VALUE(tt_srpt->nr_of_srpts != 0);
   CHECK_VALUE(tt_srpt->nr_of_srpts < 100); /* ?? */
-  CHECK_VALUE((int)tt_srpt->nr_of_srpts * sizeof(title_info_t) <= info_length);
+  CHECK_VALUE(tt_srpt->nr_of_srpts * sizeof(title_info_t) <= info_length);
 
   for(i = 0; i < tt_srpt->nr_of_srpts; i++) {
     read_playback_type(&tt_srpt->title[i].pb_ty);



More information about the libdvdnav-devel mailing list