Remove patches that shouldnt be here anymore.

This commit is contained in:
landry 2015-04-03 08:53:50 +00:00
parent b9aabe1277
commit d68f86540a
3 changed files with 0 additions and 63 deletions

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-ext_do_postgres_do_common_c,v 1.1 2014/06/19 20:25:49 jeremy Exp $
Fix use-after-free, upstream commit 23cea14f4576acea9d53df3358280ba8db7b9e5b.
--- ext/do_postgres/do_common.c.orig Thu Feb 13 02:59:50 2014
+++ ext/do_postgres/do_common.c Mon Jun 16 11:08:01 2014
@@ -63,7 +63,7 @@ void data_objects_debug(VALUE connection, VALUE string
rb_funcall(connection, DO_ID_LOG, 1, message);
}
-void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state) {
+void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, VALUE message, VALUE query, VALUE state) {
const char *exception_type = "SQLError";
const struct errcodes *e;
VALUE uri, exception;
@@ -82,7 +82,7 @@ void data_objects_raise_error(VALUE self, const struct
data_objects_const_get(mDO, exception_type),
DO_ID_NEW,
5,
- rb_str_new2(message),
+ message,
INT2NUM(errnum),
state,
query,

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-ext_do_postgres_do_common_h,v 1.1 2014/06/19 20:25:49 jeremy Exp $
Fix use-after-free, upstream commit 23cea14f4576acea9d53df3358280ba8db7b9e5b.
--- ext/do_postgres/do_common.h.orig Thu Feb 13 02:59:50 2014
+++ ext/do_postgres/do_common.h Mon Jun 16 11:08:01 2014
@@ -123,7 +123,7 @@ static inline void data_objects_define_errors(VALUE sc
}
}
-extern void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state);
+extern void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, VALUE message, VALUE query, VALUE state);
extern VALUE data_objects_typecast(const char *value, long length, const VALUE type, int encoding);

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-ext_do_postgres_do_postgres_c,v 1.1 2014/06/19 20:25:49 jeremy Exp $
Fix use-after-free, upstream commits 5cec3c5b723d14b210eada26519258255a175c05
and 23cea14f4576acea9d53df3358280ba8db7b9e5b.
--- ext/do_postgres/do_postgres.c.orig Thu Feb 13 02:59:50 2014
+++ ext/do_postgres/do_postgres.c Mon Jun 16 11:11:55 2014
@@ -99,13 +99,14 @@ VALUE do_postgres_typecast(const char *value, long len
}
void do_postgres_raise_error(VALUE self, PGresult *result, VALUE query) {
- const char *message = PQresultErrorMessage(result);
+ VALUE message = rb_str_new2(PQresultErrorMessage(result));
char *sql_state = PQresultErrorField(result, PG_DIAG_SQLSTATE);
int postgres_errno = MAKE_SQLSTATE(sql_state[0], sql_state[1], sql_state[2], sql_state[3], sql_state[4]);
+ VALUE str = rb_str_new2(sql_state);
PQclear(result);
- data_objects_raise_error(self, do_postgres_errors, postgres_errno, message, query, rb_str_new2(sql_state));
+ data_objects_raise_error(self, do_postgres_errors, postgres_errno, message, query, str);
}
/* ====== Public API ======= */