I have change my alloca for a malloc and that solves the problem<br><br>Thanks for my self.<br><br><br><div><span class="gmail_quote">On 6/24/07, <b class="gmail_sendername">Alvaro Parres</b> <<a href="mailto:aparres@gmail.com">
aparres@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi list i'm having some problems with the ast_realloac function
<br><br><br>I have this code:<br><br> char *temporal;<br> temporal = alloca(20);<br> memset(temporal,0,20);
<br> strcpy(temporal,"Hola");<br> ast_verbose(VERBOSE_PREFIX_4 "Temporal: %s",temporal);<br> temporal = (char *) <span id="st" name="st" class="st">
ast_realloc</span>(temporal,21);<br> ast_verbose(VERBOSE_PREFIX_4 "Temporal: %s",temporal);
<br><br>And the output at the asterisk is<br><br> > Temporal: Hola<br> WARNING: Realloc of unalloced memory at 0xb65c4960, in ldapget_exec of app_ldap.c, line 194<br> > Temporal: (null) <br clear="all">
<br>
I don't know if any one of you can help me with this.<br><br>Thanks.<br><span class="sg"><br>-- <br>Alvaro I. Parres Peredo<br> Director de IT<br> Grupo Xmarts SA de CV<br> Tel: +52 (33) 35 63 6261 Ext. 112<br> 01 800 087 2260
<br>
Cel: +52 (33) 33 68 1087<br> <a href="mailto:alvaro.parres@xmarts.com.mx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">alvaro.parres@xmarts.com.mx</a>
</span></blockquote></div><br><br clear="all"><br>-- <br>Alvaro I. Parres Peredo<br> Director de IT<br> Grupo Xmarts SA de CV<br> Tel: +52 (33) 35 63 6261 Ext. 112<br> 01 800 087 2260 <br> Cel: +52 (33) 33 68 1087<br>
<a href="mailto:alvaro.parres@xmarts.com.mx">alvaro.parres@xmarts.com.mx</a>