<div dir="ltr">See <a href="http://www.admb-project.org/redmine/projects/issues/repository/revisions/1772">http://www.admb-project.org/redmine/projects/issues/repository/revisions/1772</a></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Sun, Mar 9, 2014 at 5:37 PM, dave fournier <span dir="ltr"><<a href="mailto:davef@otter-rsch.com" target="_blank">davef@otter-rsch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I noticed that the subvector operator for dvectors does not<br>
check to see that the index bounds for the subvector are valid.<br>
This should fix the problem. code is in dvector.cpp<br>
<br>
<br>
dvector::dvector(_CONST predvector& pdv)<br>
 {<br>
   shape=pdv.p->shape;<br>
   if (shape)<br>
   {<br>
     (shape->ncopies)++;<br>
   }<br>
   else<br>
   {<br>
     cerr << "Taking a subvector  of an unallocated dvector"<<endl;<br>
   }<br>
   v = pdv.p->v;<br>
   int mmin=pdv.p->indexmin();<br>
   int mmax=pdv.p->indexmax();<br>
   if (<a href="http://pdv.lb" target="_blank">pdv.lb</a><mmin || pdv.ub> mmax)<br>
   {<br>
     cerr << "index out of bounds in dvector subvector operator" << endl;<br>
     ad_exit(1);<br>
   }<br>
   index_min=<a href="http://pdv.lb" target="_blank">pdv.lb</a>;<br>
   index_max=pdv.ub;<br>
 }<br>
<br>
______________________________<u></u>_________________<br>
Developers mailing list<br>
<a href="mailto:Developers@admb-project.org" target="_blank">Developers@admb-project.org</a><br>
<a href="http://lists.admb-project.org/mailman/listinfo/developers" target="_blank">http://lists.admb-project.org/<u></u>mailman/listinfo/developers</a><br>
</blockquote></div><br></div>