Skip to Content.
Sympa Menu

freetds - RE: asprintf vasprintf

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Varley, David(CBorn at Alcoa)" <David.Varley AT alcoa.com.au>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: RE: asprintf vasprintf
  • Date: Wed, 28 Aug 2002 08:47:28 +0800



This wasn't aimed specifically at your snprintf, but more at
the thread-safety issue. The samba [Patrick Powell] code looks
(after admittedly brief inspection only) to be thread safe.

David

> -----Original Message-----
> From: Lowden, James K [mailto:LowdenJK AT bernstein.com]
> Sent: Wednesday, 28 August 2002 1:34 AM
> To: TDS Development Group
> Subject: [freetds] RE: asprintf vasprintf
>
>
> > From: ZIGLIO Frediano [mailto:Frediano.Ziglio AT vodafoneomnitel.it]
> > Sent: August 27, 2002 10:14 AM
> >
> > If you read snprintf.c file and search "patrick powell snprintf" on
> > google.it
> > you'll see that many implementation of snprintf are maded by
> > Patrick Powell
> > and above source you'll find a
> >
> > /*
> > * Copyright Patrick Powell 1995
> > * This code is based on code written by Patrick Powell
> > (papowell AT astart.com)
> > * It may be used for any purpose as long as this notice
> > remains intact
> > * on all source code distributions
> > */
>
> That would be good to keep in mind.
>
> In the particular case where I used snprintf (apparently the only time
> anywhere in the project), I've allocated a 4 KB buffer for
> what should be an
> ~80 byte message, and added an assert that strlen is less
> than sizeof. If
> it ever aborts there, I'll be very surprised.
>
> So, the immediate problem with snprintf is resolved. If the other
> developers want to use snprintf, though, I'll add Patrick
> Powell's code and
> the necessary autoconf tests to cvs.
>
> --jkl
>
>
> The information contained in this transmission may contain
> privileged and
> confidential information and is intended only for the use of
> the person(s)
> named above. If you are not the intended recipient, or an
> employee or agent
> responsible for delivering this message to the intended recipient, any
> review, dissemination, distribution or duplication of this
> communication is
> strictly prohibited. If you are not the intended recipient,
> please contact
> the sender immediately by reply e-mail and destroy all copies of the
> original message. Please note that for certain accounts we do
> not accept
> orders and/or instructions by e-mail, and for those accounts
> we will not be
> responsible for carrying out such orders and/or instructions.
> Kindly refrain
> from sending orders or instructions by e-mail unless you have
> confirmed that
> we accept such communications for your account. Please also
> note that to
> satisfy regulatory requirements we review the outgoing and
> incoming e-mail
> correspondence of staff members serving certain functions.
>
>
>
> ---
> You are currently subscribed to freetds as:
> [David.Varley AT alcoa.com.au]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')
>




Archive powered by MHonArc 2.6.24.

Top of Page