pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Ivar Helbekkmo <tih@nhh.no>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tom Ivar Helbekkmo <tih@nhh.no>
Cc: Paul A Vixie <vixie@vix.com>
Cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] Open 6.4 items
Date: 10 Oct 1998 14:38:25 +0200
Message-ID: <86iuhsd22m.fsf@athene.nhh.no> (raw)
References: <23787.907968022@sss.pgh.pa.us>

Tom Lane <tgl@sss.pgh.pa.us> writes:

> Tom Ivar Helbekkmo <tih@nhh.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"



view thread (141+ messages)  latest in thread

Message-ID: <86iuhsd22m.fsf@athene.nhh.no>
Permalink:  ../86iuhsd22m.fsf@athene.nhh.no/
Also on:    postgresql.org/message-id/86iuhsd22m.fsf@athene.nhh.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tih@nhh.no, tgl@sss.pgh.pa.us, vixie@vix.com, hackers@postgreSQL.org
  Subject: Re: [HACKERS] Open 6.4 items
  In-Reply-To: <86iuhsd22m.fsf@athene.nhh.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox