1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
--- 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();
{
|