[MPlayer-cvslog] r38382 - trunk/libmpdemux/asfheader.c
reimar
subversion at mplayerhq.hu
Fri Aug 26 17:09:03 EEST 2022
Author: reimar
Date: Fri Aug 26 17:09:03 2022
New Revision: 38382
Log:
asfheader.c: Fix CHECKDEC macro.
It did not work when the second argument had
similar range as the first argument as
overflow was possible in that case.
Fixes trac issue #2393
Modified:
trunk/libmpdemux/asfheader.c
Modified: trunk/libmpdemux/asfheader.c
==============================================================================
--- trunk/libmpdemux/asfheader.c Fri Aug 26 16:50:57 2022 (r38381)
+++ trunk/libmpdemux/asfheader.c Fri Aug 26 17:09:03 2022 (r38382)
@@ -234,7 +234,7 @@ static int get_ext_stream_properties(cha
return 1;
}
-#define CHECKDEC(l, n) if (((l) -= (n)) < 0) return 0
+#define CHECKDEC(l, n) if ((l) < (n)) return 0; (l) -= (n)
static char* read_meta_record(ASF_meta_record_t* dest, char* buf,
int* buf_len)
{
More information about the MPlayer-cvslog
mailing list