On Sun, Jul 17, 2011 at 09:12:29AM -0400, Ted Unangst wrote:
> On Sun, Jul 17, 2011, Alexander Schrijver wrote:
> >> nope, only ssize_t is guaranteed.
> >
> > This is the only way i could think off.
>
> I don't think you will ever be able to get a string longer than
> SSIZE_MAX into memory, but
On Sun, Jul 17, 2011, Alexander Schrijver wrote:
>> nope, only ssize_t is guaranteed.
>
> This is the only way i could think off.
I don't think you will ever be able to get a string longer than
SSIZE_MAX into memory, but that looks good.
>
> Index: util.c
>
> nope, only ssize_t is guaranteed.
This is the only way i could think off.
Index: util.c
===
RCS file: /home/alex/scm/cvsync/src/usr.bin/grep/util.c,v
retrieving revision 1.41
diff -u -r1.41 util.c
--- util.c 11 Jul 2011 20:43
On Sun, Jul 17, 2011 at 12:15:50PM +0200, Alexander Schrijver wrote:
> On Sun, Jul 17, 2011 at 11:32:27AM +0200, Otto Moerbeek wrote:
> > On Sun, Jul 17, 2011 at 11:20:28AM +0200, Alexander Schrijver wrote:
> >
> > > This fixes an integer overflow with very long lines.
> > >
> > > OK?
> >
> > H
On Sun, Jul 17, 2011 at 11:32:27AM +0200, Otto Moerbeek wrote:
> On Sun, Jul 17, 2011 at 11:20:28AM +0200, Alexander Schrijver wrote:
>
> > This fixes an integer overflow with very long lines.
> >
> > OK?
>
> Hmm, changing from a signed to an unsigned type might lead to
> surprises. I think rego
On Sun, Jul 17, 2011 at 11:20:28AM +0200, Alexander Schrijver wrote:
> This fixes an integer overflow with very long lines.
>
> OK?
Hmm, changing from a signed to an unsigned type might lead to
surprises. I think regoff_t is better.
-Otto
>
> Index: util.c
> =
This fixes an integer overflow with very long lines.
OK?
Index: util.c
===
RCS file: /home/alex/scm/cvsync/src/usr.bin/grep/util.c,v
retrieving revision 1.41
diff -u -r1.41 util.c
--- util.c 11 Jul 2011 20:43:21 - 1.41