File: 99_SECURITY_CVE-2009-4030.dpatch

package info (click to toggle)
mysql-dfsg-5.0 5.0.32-7etch12
  • links: PTS
  • area: main
  • in suites: etch
  • size: 89,332 kB
  • ctags: 94,781
  • sloc: cpp: 436,297; ansic: 409,141; sh: 40,574; tcl: 30,484; perl: 27,872; yacc: 8,236; makefile: 5,532; java: 4,610; xml: 3,914; pascal: 3,462; sql: 2,673; awk: 1,338; asm: 1,061; sed: 772
file content (31 lines) | stat: -rw-r--r-- 1,426 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh /usr/share/dpatch/dpatch-run
## 99_SECURITY_CVE-2009-4030.dpatch by Giuseppe Iuculano <iuculano@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: CVE-2009-4030

@DPATCH@
diff -urNad mysql-dfsg-5.0~/sql/mysqld.cc mysql-dfsg-5.0/sql/mysqld.cc
--- mysql-dfsg-5.0~/sql/mysqld.cc	2010-02-11 23:44:03.000000000 +0100
+++ mysql-dfsg-5.0/sql/mysqld.cc	2010-02-11 23:48:30.000000000 +0100
@@ -7357,16 +7357,16 @@
     pos[0]= FN_LIBCHAR;
     pos[1]= 0;
   }
-  convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS);
   convert_dirname(language,language,NullS);
+  convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS);
   (void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir
+  (void) my_load_path(pidfile_name,pidfile_name,mysql_real_data_home);
+
   my_realpath(mysql_unpacked_real_data_home, mysql_real_data_home, MYF(0));
-  mysql_unpacked_real_data_home_len= strlen(mysql_unpacked_real_data_home);
+  mysql_unpacked_real_data_home_len= (int) strlen(mysql_unpacked_real_data_home);
   if (mysql_unpacked_real_data_home[mysql_unpacked_real_data_home_len-1] == FN_LIBCHAR)
     --mysql_unpacked_real_data_home_len;
 
-  (void) my_load_path(pidfile_name,pidfile_name,mysql_real_data_home);
-
   char *sharedir=get_relative_path(SHAREDIR);
   if (test_if_hard_path(sharedir))
     strmake(buff,sharedir,sizeof(buff)-1);		/* purecov: tested */