On 2015-03-02 16:10:43 +0100, Vincent Lefevre wrote:
> rewrite.c:313 is:
> 
>   stack[stackp++] = field;
> 
> With the context:
> 
>     if ( stackp > stacksize )                      /*                        
> */
>     { stacksize += 8;                              /*                        
> */
>       if ( (stack=(Uchar**)realloc((char*)stack,   /*                        
> */
>                                   stacksize*sizeof(char*)))==NULL)/*         
> */
>       { OUT_OF_MEMORY("rule stack"); }             /*                        
> */
>     }                                              /*                        
> */
>     stack[stackp++] = field;                       /*                        
> */
> 
> If I understand correctly, it seems that the 8-byte increase is not
> sufficient.

Actually, if stackp == stacksize, this is also bad.
The test should be:

  if ( stackp >= stacksize )

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to