<div dir="ltr">Doh. fixed. thanks!</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 3, 2015 at 7:27 AM, Raimund Steger <span dir="ltr"><<a href="mailto:rs@mytum.de" target="_blank">rs@mytum.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I think there is still a problem.<span class=""><br>
<br>
<br>
On 02/23/15 07:23, Akira TAGOH wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[...]<br>
  src/fcstat.c |   80 ++++++++++++++++++++++++++++++<u></u>+++++++++++++++++++++++------<br>
[...]<span class=""><br>
+int<br>
+FcScandir (const char          *dirp,<br>
+          struct dirent        ***namelist,<br>
+          int (*filter) (const struct dirent *),<br>
+          int (*compar) (const struct dirent **, const struct dirent **))<br>
</span></blockquote>
<br>
in the while loop in FcScandir, if n==lsize-1 -- it won't yet enter the 'if' branch:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[...]<span class=""><br>
+           if (n >= lsize)<br>
+           {<br>
+               lsize += 128;<br>
+               dlp = (struct dirent **) realloc (dlist, sizeof (struct dirent *) * lsize);<br>
</span></blockquote>
<br>
then this will effectively be dlist[lsize], thus unallocated:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[...]<span class=""><br>
+           }<br>
+           dlist[n++] = p;<br>
+           dlist[n] = NULL;<br>
</span></blockquote>
<br>
I think.<br>
maybe "if (n >= lsize-1)" would be better?<span class="HOEnZb"><font color="#888888"><br>
<br>
Raimund</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
-- <br>
Worringer Str 31 Duesseldorf 40211 DE  home: <<a href="mailto:rs@mytum.de" target="_blank">rs@mytum.de</a>><br>
<a href="tel:%2B49-179-2981632" value="+491792981632" target="_blank">+49-179-2981632</a> icq 16845346           work: <<a href="mailto:rs@interface-ag.de" target="_blank">rs@interface-ag.de</a>><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Akira TAGOH</div>
</div>