agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feed[Pljava-dev] -Werror=format-security fixes for 1.4.3
2+ messages / 0 participants
[nested] [flat]
* [Pljava-dev] -Werror=format-security fixes for 1.4.3
@ 2012-03-27 10:02
2012-03-30 18:08 ` [Pljava-dev] -Werror=format-security fixes for 1.4.3
0 siblings, 1 reply; 2+ messages in thread
From: @ 2012-03-27 10:02 UTC (permalink / raw)
Hi,
here's a patch that fixes build failures with gcc -Werror=format-security
Christoph
--
cb at df7cb.de | http://www.df7cb.de/
-------------- next part --------------
--- postgresql-pljava-1.4.3.orig/src/C/pljava/JNICalls.c
+++ postgresql-pljava-1.4.3/src/C/pljava/JNICalls.c
@@ -71,7 +71,7 @@ static void elogExceptionMessage(JNIEnv*
}
}
jniEnv = saveEnv;
- ereport(logLevel, (errcode(sqlState), errmsg(buf.data)));
+ ereport(logLevel, (errcode(sqlState), errmsg("%s", buf.data)));
}
static void printStacktrace(JNIEnv* env, jobject exh)
--- postgresql-pljava-1.4.3.orig/src/C/pljava/Backend.c
+++ postgresql-pljava-1.4.3/src/C/pljava/Backend.c
@@ -211,7 +211,7 @@ static jint JNICALL my_vfprintf(FILE* fp
++ep;
*ep = 0;
- elog(s_javaLogLevel, buf);
+ elog(s_javaLogLevel, "%s", buf);
return 0;
}
@@ -274,14 +274,14 @@ static void appendPathParts(const char*
if(HashMap_getByString(unique, pathPart) == 0)
{
if(HashMap_size(unique) == 0)
- appendStringInfo(bld, prefix);
+ appendStringInfo(bld, "%s", prefix);
else
#if defined(WIN32)
appendStringInfoChar(bld, ';');
#else
appendStringInfoChar(bld, ':');
#endif
- appendStringInfo(bld, pathPart);
+ appendStringInfo(bld, "%s", pathPart);
HashMap_putByString(unique, pathPart, (void*)1);
}
pfree(pathPart);
@@ -907,7 +907,7 @@ JNICALL Java_org_postgresql_pljava_inter
PG_TRY();
{
- elog(logLevel, str);
+ elog(logLevel, "%s", str);
pfree(str);
}
PG_CATCH();
--- postgresql-pljava-1.4.3.orig/src/C/pljava/Exception.c
+++ postgresql-pljava-1.4.3/src/C/pljava/Exception.c
@@ -52,7 +52,7 @@ Exception_featureNotSupported(const char
appendStringInfoString(&buf, ". It was introduced in version ");
appendStringInfoString(&buf, introVersion);
- ereport(DEBUG3, (errmsg(buf.data)));
+ ereport(DEBUG3, (errmsg("%s", buf.data)));
jmsg = String_createJavaStringFromNTS(buf.data);
ex = JNI_newObject(UnsupportedOperationException_class, UnsupportedOperationException_init, jmsg);
@@ -78,7 +78,7 @@ void Exception_throw(int errCode, const
va_start(args, errMessage);
vsnprintf(buf, sizeof(buf), errMessage, args);
- ereport(DEBUG3, (errcode(errCode), errmsg(buf)));
+ ereport(DEBUG3, (errcode(errCode), errmsg("%s", buf)));
PG_TRY();
{
@@ -118,7 +118,7 @@ void Exception_throwIllegalArgument(cons
va_start(args, errMessage);
vsnprintf(buf, sizeof(buf), errMessage, args);
- ereport(DEBUG3, (errmsg(buf)));
+ ereport(DEBUG3, (errmsg("%s", buf)));
PG_TRY();
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20120327/c8a79974/attachment.bin;
^ permalink raw reply [nested|flat] 2+ messages in thread
* [Pljava-dev] -Werror=format-security fixes for 1.4.3
2012-03-27 10:02 [Pljava-dev] -Werror=format-security fixes for 1.4.3
@ 2012-03-30 18:08 `
0 siblings, 0 replies; 2+ messages in thread
From: @ 2012-03-30 18:08 UTC (permalink / raw)
Christoph Berg <cb at df7cb.de> writes:
> Hi,
>
> here's a patch that fixes build failures with
> gcc -Werror=format-security
Thank you. It's been commited and an issue opened. See
http://pgfoundry.org/tracker/index.php?func=detail&aid=1011181&group_id=1000038&atid=334
--
Johann Oskarsson http://www.2ndquadrant.com/ |[]
PostgreSQL Development, 24x7 Support, Training and Services --+--
|
Blog: http://my.opera.com/myrkraverk/blog/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-03-30 18:08 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 10:02 [Pljava-dev] -Werror=format-security fixes for 1.4.3
2012-03-30 18:08 `
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox