gsth264parser: fix Coverity detected off by one at call to READ_UE_ALLOWED.
authorPeter Seiderer <ps.report@gmx.net>
Mon, 3 Sep 2012 11:09:29 +0000 (13:09 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 14 Sep 2012 15:27:49 +0000 (17:27 +0200)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=683263

gst-libs/gst/codecparsers/gsth264parser.c

index 1b0a212..9e8fc53 100644 (file)
@@ -1783,7 +1783,7 @@ gst_h264_parser_parse_slice_hdr (GstH264NalParser * nalparser,
 
   GST_DEBUG ("parsing \"Slice header\", slice type %u", slice->type);
 
-  READ_UE_ALLOWED (&nr, pps_id, 0, GST_H264_MAX_PPS_COUNT);
+  READ_UE_ALLOWED (&nr, pps_id, 0, GST_H264_MAX_PPS_COUNT - 1);
   pps = gst_h264_parser_get_pps (nalparser, pps_id);
 
   if (!pps) {