pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Error arguments in pl_exec.c
4+ messages / 3 participants
[nested] [flat]

* Error arguments in pl_exec.c
@ 2008-11-20 14:58  Magnus Hagander <magnus@hagander.net>
  0 siblings, 2 replies; 4+ messages in thread

From: Magnus Hagander @ 2008-11-20 14:58 UTC (permalink / raw)
  To: pgsql-hackers

I get the following warnings in HEAD

pl_exec.c: In function ‘exec_stmt_raise’:
pl_exec.c:2538: warning: format not a string literal and no format arguments
pl_exec.c:2538: warning: format not a string literal and no format arguments


Attached patch seems right to me - objections?

//Magnus

Attachments:

  [text/x-diff] plexec.diff (893B, ../../49257B22.6070005@hagander.net/2-plexec.diff)
  download | inline diff:
Index: pl_exec.c
===================================================================
RCS file: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v
retrieving revision 1.224
diff -c -r1.224 pl_exec.c
*** pl_exec.c	5 Nov 2008 00:07:54 -0000	1.224
--- pl_exec.c	20 Nov 2008 14:58:11 -0000
***************
*** 2538,2545 ****
  	ereport(stmt->elog_level,
  			(err_code ? errcode(err_code) : 0,
  			 errmsg_internal("%s", err_message),
! 			 (err_detail != NULL) ? errdetail(err_detail) : 0,
! 			 (err_hint != NULL) ? errhint(err_hint) : 0));
  
  	estate->err_text = NULL;	/* un-suppress... */
  
--- 2538,2545 ----
  	ereport(stmt->elog_level,
  			(err_code ? errcode(err_code) : 0,
  			 errmsg_internal("%s", err_message),
! 			 (err_detail != NULL) ? errdetail("%s", err_detail) : 0,
! 			 (err_hint != NULL) ? errhint("%s", err_hint) : 0));
  
  	estate->err_text = NULL;	/* un-suppress... */
  

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Error arguments in pl_exec.c
@ 2008-11-20 15:21  Gregory Stark <stark@enterprisedb.com>
  parent: Magnus Hagander <magnus@hagander.net>
  1 sibling, 0 replies; 4+ messages in thread

From: Gregory Stark @ 2008-11-20 15:21 UTC (permalink / raw)
  To: Magnus Hagander <magnus@hagander.net>; +Cc: pgsql-hackers

Magnus Hagander <magnus@hagander.net> writes:

> I get the following warnings in HEAD
>
> pl_exec.c: In function ‘exec_stmt_raise’:
> pl_exec.c:2538: warning: format not a string literal and no format arguments
> pl_exec.c:2538: warning: format not a string literal and no format arguments
>
>
> Attached patch seems right to me - objections?

ick. that's actually a security hole. Thankfully it's new code in cvs head.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's Slony Replication support!



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Error arguments in pl_exec.c
@ 2008-11-20 15:27  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Magnus Hagander <magnus@hagander.net>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2008-11-20 15:27 UTC (permalink / raw)
  To: Magnus Hagander <magnus@hagander.net>; +Cc: pgsql-hackers

Magnus Hagander <magnus@hagander.net> writes:
> Attached patch seems right to me - objections?

Good catch.  What gave you these warnings exactly?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Error arguments in pl_exec.c
@ 2008-11-20 15:36  Magnus Hagander <magnus@hagander.net>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Magnus Hagander @ 2008-11-20 15:36 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers

Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> Attached patch seems right to me - objections?
> 
> Good catch.  What gave you these warnings exactly?

Same here - the new version of gcc.

Will go ahead and apply.

//Magnus




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2008-11-20 15:36 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-11-20 14:58 Error arguments in pl_exec.c Magnus Hagander <magnus@hagander.net>
2008-11-20 15:21 ` Gregory Stark <stark@enterprisedb.com>
2008-11-20 15:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-11-20 15:36   ` Magnus Hagander <magnus@hagander.net>

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