Igor Schein on Fri, 27 Jun 2003 10:45:33 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: system() limitation


On Fri, Jun 27, 2003 at 06:50:11AM -0700, Ilya Zakharevich wrote:
> On Fri, Jun 27, 2003 at 02:25:51AM -0400, Igor Schein wrote:
> > Hi,
> > 
> > ? system("echo "vector(43201,x,1)"|wc -c")
> >  129604
> > ? system("echo "vector(43202,x,1)"|wc -c")
> >  129607
> > ? system("echo "vector(43203,x,1)"|wc -c")
> >  129610
> > ? system("echo "vector(43204,x,1)"|wc -c")
> >  129613
> > ? system("echo "vector(43205,x,1)"|wc -c")
> > ? system("echo "vector(43206,x,1)"|wc -c")
> > ?
> > 
> > Looks like a silent buffer overflow to me.  Maybe the maximum buffer
> > size allowed should be documented?
> 
> How can PARI know the limitations of the shell you are currently using?

This is not a shell limitation:

% echo `echo 'vector(1000000,x,1)' | gp -q`|wc -c
3000001

Igor