@@ -315,9 +315,9 @@ static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote
315
315
case PDO_PARAM_LOB :
316
316
/* escapedlen returned by PQescapeBytea() accounts for trailing 0 */
317
317
#ifdef HAVE_PQESCAPE_BYTEA_CONN
318
- escaped = PQescapeByteaConn (H -> server , unquoted , unquotedlen , & tmp_len );
318
+ escaped = PQescapeByteaConn (H -> server , ( unsigned char * ) unquoted , ( size_t ) unquotedlen , & tmp_len );
319
319
#else
320
- escaped = PQescapeBytea (unquoted , unquotedlen , & tmp_len );
320
+ escaped = PQescapeBytea (( unsigned char * ) unquoted , ( size_t ) unquotedlen , & tmp_len );
321
321
#endif
322
322
* quotedlen = (int )tmp_len + 1 ;
323
323
* quoted = emalloc (* quotedlen + 1 );
@@ -331,9 +331,9 @@ static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote
331
331
* quoted = safe_emalloc (2 , unquotedlen , 3 );
332
332
(* quoted )[0 ] = '\'' ;
333
333
#ifndef HAVE_PQESCAPE_CONN
334
- * quotedlen = PQescapeString (* quoted + 1 , unquoted , unquotedlen );
334
+ * quotedlen = PQescapeString (* quoted + 1 , unquoted , ( size_t ) unquotedlen );
335
335
#else
336
- * quotedlen = PQescapeStringConn (H -> server , * quoted + 1 , unquoted , unquotedlen , NULL );
336
+ * quotedlen = PQescapeStringConn (H -> server , * quoted + 1 , unquoted , ( size_t ) unquotedlen , NULL );
337
337
#endif
338
338
(* quoted )[* quotedlen + 1 ] = '\'' ;
339
339
(* quoted )[* quotedlen + 2 ] = '\0' ;
0 commit comments