<div dir="ltr">From e46d490f2fef06d5fec96c3f22f2835d64019c25 Mon Sep 17 00:00:00 2001<br>From: Aruna <<a href="mailto:aruna@multicorewareinc.com">aruna@multicorewareinc.com</a>><br>Date: Thu, 1 Oct 2020 00:28:29 +0530<br>Subject: [PATCH] abr-ladder: Fix crash due to uninitialized analysis buffer<br><br>---<br> source/abrEncApp.cpp | 4 +++-<br> 1 file changed, 3 insertions(+), 1 deletion(-)<br><br>diff --git a/source/abrEncApp.cpp b/source/abrEncApp.cpp<br>index fa62ebf63..cd85154f1 100644<br>--- a/source/abrEncApp.cpp<br>+++ b/source/abrEncApp.cpp<br>@@ -98,13 +98,15 @@ namespace X265_NS {<br>                 x265_picture_init(m_passEnc[pass]->m_param, m_inputPicBuffer[pass][idx]);<br>             }<br> <br>-            m_analysisBuffer[pass] = X265_MALLOC(x265_analysis_data, m_queueSize);<br>+            CHECKED_MALLOC_ZERO(m_analysisBuffer[pass], x265_analysis_data, m_queueSize);<br>             m_picIdxReadCnt[pass] = new ThreadSafeInteger[m_queueSize];<br>             m_analysisWrite[pass] = new ThreadSafeInteger[m_queueSize];<br>             m_analysisRead[pass] = new ThreadSafeInteger[m_queueSize];<br>             m_readFlag[pass] = X265_MALLOC(int, m_queueSize);<br>         }<br>         return true;<br>+    fail:<br>+        return false;<br>     }<br> <br>     void AbrEncoder::destroy()<br>-- <br>2.20.1.windows.1<br><br><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font face="georgia, serif">Regards,</font><div><b><font face="georgia, serif">Aruna Matheswaran,</font></b></div><div><font face="georgia, serif">Video Codec Engineer,</font></div><div><font face="georgia, serif">Media & AI analytics BU,</font></div><div><span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:153px;height:58px"><img src="https://lh5.googleusercontent.com/gjX5cPNIZgwUrhfqkTwQUZWztIKmmo0qs3kbwvkS5H-bDVE2ftte9pMTVnFLSjOcjYWLtfc6_OGpxW4vraLg2r5QAIf1Q3MpldFDgWtzK_gXi8ptw5B3joIbsGL6mxj-JRdjHzT5" width="96" height="36" style="margin-left:0px;margin-top:0px"></span></span></span><font face="georgia, serif"><br></font></div><div><span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:153px;height:58px"><img src="https://lh5.googleusercontent.com/gjX5cPNIZgwUrhfqkTwQUZWztIKmmo0qs3kbwvkS5H-bDVE2ftte9pMTVnFLSjOcjYWLtfc6_OGpxW4vraLg2r5QAIf1Q3MpldFDgWtzK_gXi8ptw5B3joIbsGL6mxj-JRdjHzT5" style="margin-left:0px;margin-top:0px"></span></span></span><font face="georgia, serif"><br></font></div><div><font face="georgia, serif"><br></font></div></div></div></div></div></div></div></div></div></div>