Source-Changes archive

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

Re: CVS commit: src/dist/cdk



On Thu, Aug 28, 2003 at 02:56:36PM +0100, David Laight wrote:
> On Thu, Aug 28, 2003 at 11:32:34AM +0000, Alistair G. Crooks wrote:
> > 
> > Module Name:        src
> > Committed By:       agc
> > Date:               Thu Aug 28 11:32:34 UTC 2003
> > 
> > Modified Files:
> >     src/dist/cdk: scroll.c
> > 
> > Log Message:
> > Use bounded string op (snprintf instead of sprintf) for an automatic
> > array which is used to calculate the maximum width of a scroll entry
> > item.  Previous use of sprintf would blindly overwrite the stack if
> > there were more than 100 characters in an entry item.
> 
> Mmmm - so now it silently discards anything longer than 100 chars.
> Is that really a fix?

It means you won't get a core dump if you give it a line longer than
96 characters. So, yes, it's really a fix.
 
> I also nate a similar array of size 256 further down the file....

Right. It won't core dump either now.

Alistair



Home | Main Index | Thread Index | Old Index