expand_number() for fetch'es -B and -S switches

Dag-Erling Smørgrav des at des.no
Wed Sep 8 11:48:51 UTC 2010


Alexander Best <arundel at freebsd.org> writes:
> Dag-Erling Smørgrav <des at des.no> writes:
> > Alexander Best <arundel at freebsd.org> writes:
> > > so how about forgetting about expand_number() and simply
> > > introducing a maximum buffer size of 1 megabyte?
> > so how about just leaving the code alone?  :)
> i thought you wanted to have a maximum buffer size of 1MB in fetch?

Yes, I was just commenting on the highly roundabout way we followed only
to end up almost at the status quo.

> right now -B can be any value and it's quite easy to trigger ENOMEM.

"don't do that, then!"

My suggestion is that if you're going to change it at all, use
expand_number() *and* limit it to 1 MB.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list