aboutsummaryrefslogtreecommitdiffstats
path: root/databases/mysql55-server
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2008-10-11 02:35:13 +0800
committerale <ale@FreeBSD.org>2008-10-11 02:35:13 +0800
commitcd50d0b29f4aa25190514e8d191cc493939f3b66 (patch)
tree422cc749f593c4a8002318d0cae116018f488f1f /databases/mysql55-server
parent9d67d94da1f8972b828d8aea86071829a6befbf7 (diff)
downloadfreebsd-ports-graphics-cd50d0b29f4aa25190514e8d191cc493939f3b66.tar.gz
freebsd-ports-graphics-cd50d0b29f4aa25190514e8d191cc493939f3b66.tar.zst
freebsd-ports-graphics-cd50d0b29f4aa25190514e8d191cc493939f3b66.zip
- Fix client input validation vulnerability
- Fix my.cnf search path
Diffstat (limited to 'databases/mysql55-server')
-rw-r--r--databases/mysql55-server/Makefile2
-rw-r--r--databases/mysql55-server/files/patch-client_mysql.cc27
-rw-r--r--databases/mysql55-server/files/patch-mysys_default.c2
3 files changed, 29 insertions, 2 deletions
diff --git a/databases/mysql55-server/Makefile b/databases/mysql55-server/Makefile
index d1a9f7e0c66..ee676ffc8b9 100644
--- a/databases/mysql55-server/Makefile
+++ b/databases/mysql55-server/Makefile
@@ -7,7 +7,7 @@
PORTNAME?= mysql
PORTVERSION= 5.1.28
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_MYSQL}
MASTER_SITE_SUBDIR= MySQL-5.1
diff --git a/databases/mysql55-server/files/patch-client_mysql.cc b/databases/mysql55-server/files/patch-client_mysql.cc
new file mode 100644
index 00000000000..73bccef5bdb
--- /dev/null
+++ b/databases/mysql55-server/files/patch-client_mysql.cc
@@ -0,0 +1,27 @@
+--- client/mysql.cc.orig 2007-11-13 13:29:42 +0000
++++ client/mysql.cc 2008-05-01 19:16:09 +0000
+@@ -2636,9 +2636,12 @@
+ {
+ while((field = mysql_fetch_field(result)))
+ {
+- tee_fprintf(PAGER, "<TH>%s</TH>", (field->name ?
+- (field->name[0] ? field->name :
+- " &nbsp; ") : "NULL"));
++ tee_fputs("<TH>", PAGER);
++ if (field->name && field->name[0])
++ xmlencode_print(field->name, field->name_length);
++ else
++ tee_fputs(field->name ? " &nbsp; " : "NULL", PAGER);
++ tee_fputs("</TH>", PAGER);
+ }
+ (void) tee_fputs("</TR>", PAGER);
+ }
+@@ -2651,7 +2654,7 @@
+ for (uint i=0; i < mysql_num_fields(result); i++)
+ {
+ (void) tee_fputs("<TD>", PAGER);
+- safe_put_field(cur[i],lengths[i]);
++ xmlencode_print(cur[i], lengths[i]);
+ (void) tee_fputs("</TD>", PAGER);
+ }
+ (void) tee_fputs("</TR>", PAGER);
diff --git a/databases/mysql55-server/files/patch-mysys_default.c b/databases/mysql55-server/files/patch-mysys_default.c
index d9fa1b43088..60d2b30ba25 100644
--- a/databases/mysql55-server/files/patch-mysys_default.c
+++ b/databases/mysql55-server/files/patch-mysys_default.c
@@ -15,7 +15,7 @@
if (DEFAULT_SYSCONFDIR != "")
+ {
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
-+ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "mysql", dirs);
++ errors += add_directory(alloc, DEFAULT_SYSCONFDIR "/mysql", dirs);
+ }
#endif /* DEFAULT_SYSCONFDIR */