Skip site navigation (1) Skip section navigation (2)

Oops in snprintf.c

From: "Taral" <taral(at)mail(dot)utexas(dot)edu>
To: <hackers(at)postgresql(dot)org>
Subject: Oops in snprintf.c
Date: 1998-10-07 21:19:01
Message-ID: 000401bdf238$1a967400$3b291f0a@taral (view raw or flat)
Thread:
Lists: pgsql-hackers
I think I mentioned this before, but no-one fixed it... The variable 'value'
is being assigned a long_long when %ll is being used, but value is only a
'long'... Don'tcha wish there were type-checking for va_arg?

Enjoy.

Taral

*** ./backend/port/snprintf.c.orig      Wed Oct  7 17:15:04 1998
--- ./backend/port/snprintf.c   Wed Oct  7 17:16:07 1998
***************
*** 130,136 ****
--- 130,140 ----
  dopr(char *buffer, const char *format,...)
  {
        int                     ch;
+ #ifdef HAVE_LONG_INT_64
+       long_long       value;
+ #else
        long            value;
+ #endif
        int                     longflag = 0;
        int                     longlongflag = 0;
        int                     pointflag = 0;


Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-10-07 21:33:07
Subject: Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Previous:From: David HartwigDate: 1998-10-07 20:34:15
Subject: Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group