<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 17, 2013 at 2:37 PM, Wenju He <span dir="ltr"><<a href="mailto:wenju@multicorewareinc.com" target="_blank">wenju@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Wenju He <<a href="mailto:wenju@multicorewareinc.com">wenju@multicorewareinc.com</a>><br>
# Date 1379446629 18000<br>
# Tue Sep 17 14:37:09 2013 -0500<br>
# Node ID a51641ea0344cdbd17d7d8195fc5753d77e9bdc6<br>
# Parent 97e1bed019a62849c5cc514ee74efbf64647986c<br>
fix allocation crash if input y4m file is not found<br></blockquote><div><br></div><div>Thanks, pushed. Optimally parseHeader() would return a bool whether the dimensions were correctly read from the file, and we would check that as well.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
diff -r 97e1bed019a6 -r a51641ea0344 source/input/y4m.cpp<br>
--- a/source/input/y4m.cpp Tue Sep 17 13:41:27 2013 -0500<br>
+++ b/source/input/y4m.cpp Tue Sep 17 14:37:09 2013 -0500<br>
@@ -33,8 +33,10 @@<br>
{<br>
ifs.open(filename, ios::binary | ios::in);<br>
if (!ifs.fail())<br>
+ {<br>
parseHeader();<br>
- buf = new char[3 * width * height / 2];<br>
+ buf = new char[3 * width * height / 2];<br>
+ }<br>
}<br>
<br>
Y4MInput::~Y4MInput()<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>