Fix unportable usage associated with va_list arguments
This commit is contained in:
parent
6a1ccd79dd
commit
247bef4027
55
mysql-va-list.patch
Normal file
55
mysql-va-list.patch
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
Fix unportable usage associated with va_list arguments. Passing "0" to
|
||||||
|
a va_list argument only works if va_list is an integer or pointer type,
|
||||||
|
which is not required by the C spec, and is not true on ARM for instance.
|
||||||
|
Per bug #744707.
|
||||||
|
|
||||||
|
|
||||||
|
diff -Naur mysql-5.5.16.orig/sql-common/client_plugin.c mysql-5.5.16/sql-common/client_plugin.c
|
||||||
|
--- mysql-5.5.16.orig/sql-common/client_plugin.c 2011-09-09 11:56:39.000000000 -0400
|
||||||
|
+++ mysql-5.5.16/sql-common/client_plugin.c 2011-10-16 23:00:00.708799138 -0400
|
||||||
|
@@ -228,11 +228,13 @@
|
||||||
|
{
|
||||||
|
MYSQL mysql;
|
||||||
|
struct st_mysql_client_plugin **builtin;
|
||||||
|
+ va_list unused;
|
||||||
|
|
||||||
|
if (initialized)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
|
||||||
|
+ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */
|
||||||
|
|
||||||
|
pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW);
|
||||||
|
init_alloc_root(&mem_root, 128, 128);
|
||||||
|
@@ -244,7 +246,7 @@
|
||||||
|
pthread_mutex_lock(&LOCK_load_client_plugin);
|
||||||
|
|
||||||
|
for (builtin= mysql_client_builtins; *builtin; builtin++)
|
||||||
|
- add_plugin(&mysql, *builtin, 0, 0, 0);
|
||||||
|
+ add_plugin(&mysql, *builtin, 0, 0, unused);
|
||||||
|
|
||||||
|
pthread_mutex_unlock(&LOCK_load_client_plugin);
|
||||||
|
|
||||||
|
@@ -288,9 +290,13 @@
|
||||||
|
mysql_client_register_plugin(MYSQL *mysql,
|
||||||
|
struct st_mysql_client_plugin *plugin)
|
||||||
|
{
|
||||||
|
+ va_list unused;
|
||||||
|
+
|
||||||
|
if (is_not_initialized(mysql, plugin->name))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
+ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */
|
||||||
|
+
|
||||||
|
pthread_mutex_lock(&LOCK_load_client_plugin);
|
||||||
|
|
||||||
|
/* make sure the plugin wasn't loaded meanwhile */
|
||||||
|
@@ -302,7 +308,7 @@
|
||||||
|
plugin= NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
- plugin= add_plugin(mysql, plugin, 0, 0, 0);
|
||||||
|
+ plugin= add_plugin(mysql, plugin, 0, 0, unused);
|
||||||
|
|
||||||
|
pthread_mutex_unlock(&LOCK_load_client_plugin);
|
||||||
|
return plugin;
|
@ -1,6 +1,6 @@
|
|||||||
Name: mysql
|
Name: mysql
|
||||||
Version: 5.5.16
|
Version: 5.5.16
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
# Update this whenever F15 gets rebased; it must be NVR-greater than F15 pkg.
|
# Update this whenever F15 gets rebased; it must be NVR-greater than F15 pkg.
|
||||||
# Our convention for the life of F15 is that sysv packages will be numbered
|
# Our convention for the life of F15 is that sysv packages will be numbered
|
||||||
# 1dist.n while systemd packages will be 2dist and higher.
|
# 1dist.n while systemd packages will be 2dist and higher.
|
||||||
@ -53,6 +53,7 @@ Patch10: mysql-plugin-bool.patch
|
|||||||
Patch11: mysql-s390-tsc.patch
|
Patch11: mysql-s390-tsc.patch
|
||||||
Patch12: mysql-openssl-test.patch
|
Patch12: mysql-openssl-test.patch
|
||||||
Patch13: mysqld-nowatch.patch
|
Patch13: mysqld-nowatch.patch
|
||||||
|
Patch14: mysql-va-list.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
BuildRequires: perl, readline-devel, openssl-devel
|
BuildRequires: perl, readline-devel, openssl-devel
|
||||||
@ -203,6 +204,7 @@ the MySQL sources.
|
|||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
|
%patch14 -p1
|
||||||
|
|
||||||
# workaround for upstream bug #56342
|
# workaround for upstream bug #56342
|
||||||
rm -f mysql-test/t/ssl_8k_key-master.opt
|
rm -f mysql-test/t/ssl_8k_key-master.opt
|
||||||
@ -652,6 +654,10 @@ fi
|
|||||||
%{_mandir}/man1/mysql_client_test.1*
|
%{_mandir}/man1/mysql_client_test.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Oct 16 2011 Tom Lane <tgl@redhat.com> 5.5.16-3
|
||||||
|
- Fix unportable usage associated with va_list arguments
|
||||||
|
Resolves: #744707
|
||||||
|
|
||||||
* Sun Oct 16 2011 Tom Lane <tgl@redhat.com> 5.5.16-2
|
* Sun Oct 16 2011 Tom Lane <tgl@redhat.com> 5.5.16-2
|
||||||
- Update to MySQL 5.5.16, for various fixes described at
|
- Update to MySQL 5.5.16, for various fixes described at
|
||||||
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-16.html
|
http://dev.mysql.com/doc/refman/5.5/en/news-5-5-16.html
|
||||||
|
Loading…
Reference in New Issue
Block a user