--- alg/gdal_crs.c.str 2009-01-05 02:05:34.000000000 +0100 +++ alg/gdal_crs.c 2009-01-05 02:05:53.000000000 +0100 @@ -213,7 +213,7 @@ if (nCRSresult != 1) { - CPLError( CE_Failure, CPLE_AppDefined, CRS_error_message[-nCRSresult]); + CPLError( CE_Failure, CPLE_AppDefined, "%s", CRS_error_message[-nCRSresult]); GDALDestroyGCPTransformer( psInfo ); return NULL; } --- frmts/dods/dodsdataset2.cpp.str 2009-01-05 02:58:21.000000000 +0100 +++ frmts/dods/dodsdataset2.cpp 2009-01-05 02:58:48.000000000 +0100 @@ -1044,7 +1044,7 @@ string msg = "An error occurred while creating a virtual connection to the DAP server:\n"; msg += e.get_error_message(); - CPLError(CE_Failure, CPLE_AppDefined, msg.c_str()); + CPLError(CE_Failure, CPLE_AppDefined, "%s", msg.c_str()); return 0; } @@ -1590,7 +1590,7 @@ /* Catch exceptions */ /* -------------------------------------------------------------------- */ catch (Error &e) { - CPLError(CE_Failure, CPLE_AppDefined, e.get_error_message().c_str()); + CPLError(CE_Failure, CPLE_AppDefined, "%s", e.get_error_message().c_str()); return CE_Failure; } --- frmts/gsg/gsagdataset.cpp.str 2009-01-05 02:27:17.000000000 +0100 +++ frmts/gsg/gsagdataset.cpp 2009-01-05 02:27:29.000000000 +0100 @@ -1059,7 +1059,7 @@ delete poDS; if (szErrorMsg) - CPLError( CE_Failure, CPLE_AppDefined, szErrorMsg ); + CPLError( CE_Failure, CPLE_AppDefined, "%s", szErrorMsg ); return NULL; } --- frmts/raw/mffdataset.cpp.str 2009-01-05 02:10:17.000000000 +0100 +++ frmts/raw/mffdataset.cpp 2009-01-05 02:11:55.000000000 +0100 @@ -1430,37 +1430,37 @@ /* top left */ /* -------------------------------------------------------------------- */ sprintf( szValue, "TOP_LEFT_CORNER_LATITUDE = %.10f\n", padfTiepoints[1] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); sprintf( szValue, "TOP_LEFT_CORNER_LONGITUDE = %.10f\n", padfTiepoints[0] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); /* -------------------------------------------------------------------- */ /* top_right */ /* -------------------------------------------------------------------- */ sprintf( szValue, "TOP_RIGHT_CORNER_LATITUDE = %.10f\n", padfTiepoints[3] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); sprintf( szValue, "TOP_RIGHT_CORNER_LONGITUDE = %.10f\n", padfTiepoints[2] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); /* -------------------------------------------------------------------- */ /* bottom_left */ /* -------------------------------------------------------------------- */ sprintf( szValue, "BOTTOM_LEFT_CORNER_LATITUDE = %.10f\n", padfTiepoints[5] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); sprintf( szValue, "BOTTOM_LEFT_CORNER_LONGITUDE = %.10f\n", padfTiepoints[4] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); /* -------------------------------------------------------------------- */ /* bottom_right */ /* -------------------------------------------------------------------- */ sprintf( szValue, "BOTTOM_RIGHT_CORNER_LATITUDE = %.10f\n", padfTiepoints[7] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); sprintf( szValue, "BOTTOM_RIGHT_CORNER_LONGITUDE = %.10f\n", padfTiepoints[6] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); /* -------------------------------------------------------------------- */ /* Center */ /* -------------------------------------------------------------------- */ sprintf( szValue, "CENTRE_LATITUDE = %.10f\n", padfTiepoints[9] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); sprintf( szValue, "CENTRE_LONGITUDE = %.10f\n", padfTiepoints[8] ); - fprintf( fp, szValue ); + fprintf( fp, "%s", szValue ); CPLFree(szValue); @@ -1509,7 +1509,7 @@ fprintf(fp,"PROJECTION_NAME = UTM\n"); sprintf(ol_txt,"PROJECTION_ORIGIN_LONGITUDE = %f\n", oSRS->GetProjParm(SRS_PP_CENTRAL_MERIDIAN,0.0,&ogrerrorOl)); - fprintf(fp,ol_txt); + fprintf(fp,"%s",ol_txt); CPLFree(ol_txt); } else if ((oSRS->GetAttrValue("PROJECTION") == NULL) && (oSRS->IsGeographic())) @@ -1534,14 +1534,14 @@ if (spheroid_name != NULL) { sprintf(ol_txt,"SPHEROID_NAME = %s\n",spheroid_name ); - fprintf(fp,ol_txt); + fprintf(fp,"%s",ol_txt); } else { sprintf(ol_txt, "SPHEROID_NAME = USER_DEFINED\nSPHEROID_EQUATORIAL_RADIUS = %.10f\nSPHEROID_POLAR_RADIUS = %.10f\n", eq_radius,eq_radius*(1-1.0/inv_flattening) ); - fprintf(fp,ol_txt); + fprintf(fp,"%s",ol_txt); } delete mffEllipsoids; CPLFree(ol_txt); --- ogr/ogrsf_frmts/dods/ogrdodsdatasource.cpp.str 2009-01-05 03:09:02.000000000 +0100 +++ ogr/ogrsf_frmts/dods/ogrdodsdatasource.cpp 2009-01-05 03:09:14.000000000 +0100 @@ -155,7 +155,7 @@ } catch (Error &e) { - CPLError(CE_Failure, CPLE_OpenFailed, + CPLError(CE_Failure, CPLE_OpenFailed, "%s", e.get_error_message().c_str() ); return FALSE; } --- ogr/ogrsf_frmts/pg/ogrpglayer.cpp.str 2009-01-05 03:11:47.000000000 +0100 +++ ogr/ogrsf_frmts/pg/ogrpglayer.cpp 2009-01-05 03:12:22.000000000 +0100 @@ -1426,7 +1426,7 @@ /* Convert the 1st byte, which is the endianess flag, to hex. */ pszHex = CPLBinaryToHex( 1, pabyWKB ); - sprintf(pszTextBufCurrent, pszHex ); + sprintf(pszTextBufCurrent, "%s",pszHex ); CPLFree ( pszHex ); pszTextBufCurrent += 2; @@ -1445,7 +1445,7 @@ /* Now write the geom type which is 4 bytes */ pszHex = CPLBinaryToHex( 4, (GByte*) &geomType ); - sprintf(pszTextBufCurrent, pszHex ); + sprintf(pszTextBufCurrent, "%s",pszHex ); CPLFree ( pszHex ); pszTextBufCurrent += 8; @@ -1455,7 +1455,7 @@ /* Force the srsid to wkbNDR (little) endianess */ GUInt32 nGSRSId = CPL_LSBWORD32( nSRSId ); pszHex = CPLBinaryToHex( sizeof(nGSRSId),(GByte*) &nGSRSId ); - sprintf(pszTextBufCurrent, pszHex ); + sprintf(pszTextBufCurrent, "%s",pszHex ); CPLFree ( pszHex ); pszTextBufCurrent += 8; } @@ -1463,7 +1463,7 @@ /* Copy the rest of the data over - subtract 5 since we already copied 5 bytes above */ pszHex = CPLBinaryToHex( nWkbSize - 5, pabyWKB + 5 ); - sprintf(pszTextBufCurrent, pszHex ); + sprintf(pszTextBufCurrent, "%s",pszHex ); CPLFree ( pszHex ); CPLFree( pabyWKB ); --- port/cpl_odbc.cpp.str 2009-01-05 01:58:12.000000000 +0100 +++ port/cpl_odbc.cpp 2009-01-05 02:01:28.000000000 +0100 @@ -107,7 +107,7 @@ /* because the pointer is used directly by putenv in old glibc */ putenv( pszEnvIni ); - CPLDebug( "ODBC", pszEnvIni ); + CPLDebug( "ODBC", "%s", pszEnvIni ); } // Try to install ODBC driver in new location @@ -675,7 +675,7 @@ { if ( nRetCode != SQL_NO_DATA ) { - CPLError( CE_Failure, CPLE_AppDefined, + CPLError( CE_Failure, CPLE_AppDefined, "%s", m_poSession->GetLastError() ); } return FALSE; @@ -688,7 +688,7 @@ { if ( nRetCode == SQL_NO_DATA ) { - CPLError( CE_Failure, CPLE_AppDefined, + CPLError( CE_Failure, CPLE_AppDefined, "%s", m_poSession->GetLastError() ); } return FALSE; @@ -720,7 +720,7 @@ { if ( nRetCode == SQL_NO_DATA ) { - CPLError( CE_Failure, CPLE_AppDefined, + CPLError( CE_Failure, CPLE_AppDefined, "%s", m_poSession->GetLastError() ); } return FALSE; @@ -761,7 +761,7 @@ if( Failed( nRetCode ) ) { - CPLError( CE_Failure, CPLE_AppDefined, + CPLError( CE_Failure, CPLE_AppDefined, "%s", m_poSession->GetLastError() ); return FALSE; } --- port/cpl_vsil_gzip.cpp.str 2009-01-05 02:01:40.000000000 +0100 +++ port/cpl_vsil_gzip.cpp 2009-01-05 02:01:56.000000000 +0100 @@ -1485,7 +1485,7 @@ } } - CPLError(CE_Failure, CPLE_NotSupported, msg.c_str()); + CPLError(CE_Failure, CPLE_NotSupported, "%s", msg.c_str()); cpl_unzClose(unzF); return NULL; --- swig/python/extensions/gdal_wrap.cpp.str 2009-01-29 08:08:51.000000000 -0500 +++ swig/python/extensions/gdal_wrap.cpp 2009-01-29 08:09:16.000000000 -0500 @@ -867,7 +867,7 @@ Py_DECREF(old_str); Py_DECREF(value); } else { - PyErr_Format(PyExc_RuntimeError, mesg); + PyErr_Format(PyExc_RuntimeError, "%s",mesg); } } @@ -2692,10 +2692,10 @@ void Debug( const char *msg_class, const char *message ) { - CPLDebug( msg_class, message ); + CPLDebug( msg_class, "%s",message ); } void Error( CPLErr msg_class = CE_Failure, int err_code = 0, const char* msg = "error" ) { - CPLError( msg_class, err_code, msg ); + CPLError( msg_class, err_code, "%s",msg ); } CPLErr PushErrorHandler( char const * pszCallbackName = "CPLQuietErrorHandler" ) { --- swig/python/extensions/gdalconst_wrap.c~ 2008-07-24 13:26:03.000000000 -0400 +++ swig/python/extensions/gdalconst_wrap.c 2009-01-29 08:24:30.000000000 -0500 @@ -850,7 +850,7 @@ Py_DECREF(old_str); Py_DECREF(value); } else { - PyErr_Format(PyExc_RuntimeError, mesg); + PyErr_Format(PyExc_RuntimeError, "%s",mesg); } } --- swig/python/extensions/osr_wrap.cpp.str 2009-01-29 08:25:31.000000000 -0500 +++ swig/python/extensions/osr_wrap.cpp 2009-01-29 08:25:41.000000000 -0500 @@ -867,7 +867,7 @@ Py_DECREF(old_str); Py_DECREF(value); } else { - PyErr_Format(PyExc_RuntimeError, mesg); + PyErr_Format(PyExc_RuntimeError, "%s",mesg); } } --- swig/python/extensions/ogr_wrap.cpp.str 2009-01-29 08:26:38.000000000 -0500 +++ swig/python/extensions/ogr_wrap.cpp 2009-01-29 08:26:47.000000000 -0500 @@ -867,7 +867,7 @@ Py_DECREF(old_str); Py_DECREF(value); } else { - PyErr_Format(PyExc_RuntimeError, mesg); + PyErr_Format(PyExc_RuntimeError,"%s", mesg); } }