From 8515f5a91e4382aa21b883d3b01ade5739b76ce0 Mon Sep 17 00:00:00 2001 From: Jesse Xi Date: Tue, 17 Nov 2020 16:44:37 +0800 Subject: [PATCH] =?UTF-8?q?incomplete=5Flen=20=E5=9C=A8=E5=A4=A7=E5=8D=8E?= =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4=E4=B8=8B=EF=BC=8C=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E5=A4=A7=E5=8D=8E=E5=8C=85=E5=A4=B4=E5=AF=B9=E9=9F=B3=E9=A2=91?= =?UTF-8?q?=E7=9A=84=E4=B8=8D=E6=A0=87=E5=87=86=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=B8=BA=E8=B4=9F=E5=80=BC=EF=BC=8C=E8=80=8C?= =?UTF-8?q?sizeof(SrsPsPacketStartCode)=20=E8=BF=94=E5=9B=9E=E7=9A=84?= =?UTF-8?q?=E6=98=AFunsigned=20=E7=B1=BB=E5=9E=8B=EF=BC=8C=20=E5=9B=A0?= =?UTF-8?q?=E4=BA=9B=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD=20(#2039)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: jesse.xi --- trunk/src/app/srs_app_gb28181.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_gb28181.cpp b/trunk/src/app/srs_app_gb28181.cpp index d1229ff09..bfea9a007 100644 --- a/trunk/src/app/srs_app_gb28181.cpp +++ b/trunk/src/app/srs_app_gb28181.cpp @@ -954,7 +954,8 @@ srs_error_t SrsPsStreamDemixer::on_ps_stream(char* ps_data, int ps_size, uint32_ ps_fw.write(ps_data, ps_size, NULL); #endif - while(incomplete_len >= sizeof(SrsPsPacketStartCode)) + while(incomplete_len > 0 + && incomplete_len >= sizeof(SrsPsPacketStartCode)) { if (next_ps_pack && next_ps_pack[0] == (char)0x00