Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Tom Ivar Helbekkmo <tih(at)nhh(dot)no> writes:
> > As far as I
> > can tell, the only actual error in Paul Vixie's code is that the two
> > lines you quote above should be:
> > else if (--size > 0)
> > *++dst = 0, dirty = 0;
>
> No, that's still wrong, because it will error out (jump to emsgsize)
> one byte sooner than it should. The loop is fundamentally broken
> because it wants to grab and zero a byte before it knows whether there
> are any digits for the byte.
Damn! You're right! I swear I tested that change at home, and found
it to do what I wanted -- but now that I've put it into my production
system at work, it doesn't work here. Heck, I even read the code very
carefully to verify that it was all that was needed! I think I really
need the holiday I'm taking next week!
To keep this in sync with BIND, maybe Paul could take a look, and fix
the code the way he wants it there?
Whoops. It just hit me. When I tested my "quick fix" last night, I
just looked at what happened to the data, and ignored the return
value. Silly of me...
-tih
--
Popularity is the hallmark of mediocrity. --Niles Crane, "Frasier"
In response to
pgsql-hackers by date
| Next: | From: D'Arcy J.M. Cain | Date: 1998-10-10 13:08:37 |
| Subject: Re: [HACKERS] Re: hackers-digest V1 #1013 |
| Previous: | From: Tom Ivar Helbekkmo | Date: 1998-10-10 12:12:40 |
| Subject: Re: [HACKERS] Open 6.4 items |