Merge lp:~clint-fewbar/ubuntu/natty/php5/fix-mssql-segfault into lp:ubuntu/natty/php5

Proposed by Clint Byrum on 2010-12-04
Status: Merged
Approved by: Kees Cook on 2010-12-06
Approved revision: 77
Merged at revision: 77
Proposed branch: lp:~clint-fewbar/ubuntu/natty/php5/fix-mssql-segfault
Merge into: lp:ubuntu/natty/php5
Diff against target: 50 lines (+30/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/mssql_fix_segfault.patch (+22/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~clint-fewbar/ubuntu/natty/php5/fix-mssql-segfault
Reviewer Review Type Date Requested Status
Kees Cook 2010-12-04 Approve on 2010-12-06
Clint Byrum Resubmit on 2010-12-06
Artur Rona (community) 2010-12-04 Needs Fixing on 2010-12-04
Review via email: mp+42705@code.launchpad.net

Description of the Change

Merged with latest natty, and changed patch to the actual patch that was used upstream.

To post a comment you must log in.
Artur Rona (ari-tczew) wrote :

Please remove added blank line at the end of debian/changelog.
Please use short URLs in DEP3 tags, so:
Bug: http://bugs.php.net/52843
Bug-Ubuntu: https://launchpad.net/bugs/611316

review: Needs Fixing
76. By Clint Byrum on 2010-12-04

- removing blank line on changelog
- using short bug urls

Clint Byrum (clint-fewbar) wrote :

Artur, thanks for the review.

Just pushed up revno 76, should address those issues.

Can you point me to where the DEP-3 guidelines are? I was going by these:

http://dep.debian.net/deps/dep3/

Which does not mention short urls.

Artur Rona (ari-tczew) wrote :

Maybe this is not required by DEP3 policy, but this is elegant and nice data. We prefer to use short URLs to make DEP3 tags as small as possible. You can find short URL on DEP3 tags site under samples (Bug-Debian is short).

From policy hand, looks good. Let's check building... FTBFS!

Applying patch mssql_fix_segfault.patch
patching file ext/mssql/php_mssql.c
Hunk #1 FAILED at 539.
1 out of 1 hunk FAILED -- rejects in file ext/mssql/php_mssql.c
Patch mssql_fix_segfault.patch does not apply (enforce with -f)
make: *** [debian/stamp-patched] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2
E: Failed autobuilding of package

Please check whether other patches do something on file ext/mssql/php_mssql.c.

review: Needs Fixing
Clint Byrum (clint-fewbar) wrote :

Artur, again thanks for all the clarification and testing. I normally would have rebuilt before pushing but was in a rush on Friday, so apologies for wasting your time.

Ok, I refreshed the patch, and re-ran the test case of php -r 'mssql_connect("");', it works properly in natty. Pushed up to the branch.

review: Resubmit
77. By Clint Byrum on 2010-12-06

refreshing patch

Kees Cook (kees) wrote :

This looks pretty good to me. I've further adjusted the patch DEP3 and changelog so that is is 80-character wrapped, and doesn't contain blank lines in the patch header.

Thanks for the patch, and the reviews!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-11-24 10:44:36 +0000
3+++ debian/changelog 2010-12-06 15:55:34 +0000
4@@ -1,3 +1,10 @@
5+php5 (5.3.3-1ubuntu11) natty; urgency=low
6+
7+ * debian/patches/mssql-fix-segfault.patch: Fixes segfault on missing parameters
8+ for mssql. upstream php bug #52843 and (LP: #611316)
9+
10+ -- Clint Byrum <clint@ubuntu.com> Fri, 03 Dec 2010 23:45:19 -0800
11+
12 php5 (5.3.3-1ubuntu10) natty; urgency=low
13
14 * debian/patches/configure-as-needed.patch. Work around suspicious
15
16=== added file 'debian/patches/mssql_fix_segfault.patch'
17--- debian/patches/mssql_fix_segfault.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/mssql_fix_segfault.patch 2010-12-06 15:55:34 +0000
19@@ -0,0 +1,22 @@
20+From: Clint Byrum <clint@ubuntu.com>
21+Subject: Fix segfault on omitted optional parameters for mssql_connect()
22+
23+* ext/mssql/php_mssql.c: Initialize lengths to prevent segfaults
24+
25+Origin: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/mssql/php_mssql.c?r1=303375&r2=303374&pathrev=303375
26+Bug: http://bugs.php.net/52843
27+Bug-Ubuntu: https://launchpad.net/bugs/611316
28+
29+Index: fix-mssql-segfault/ext/mssql/php_mssql.c
30+===================================================================
31+--- fix-mssql-segfault.orig/ext/mssql/php_mssql.c 2010-12-06 06:00:32.000000000 -0800
32++++ fix-mssql-segfault/ext/mssql/php_mssql.c 2010-12-06 06:01:39.101694001 -0800
33+@@ -571,7 +571,7 @@
34+ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
35+ {
36+ char *host = NULL, *user = NULL, *passwd = NULL;
37+- int host_len, user_len, passwd_len;
38++ int host_len = 0, user_len = 0, passwd_len = 0;
39+ zend_bool new_link = 0;
40+ char *hashed_details;
41+ int hashed_details_length;
42
43=== modified file 'debian/patches/series'
44--- debian/patches/series 2010-11-24 10:44:36 +0000
45+++ debian/patches/series 2010-12-06 15:55:34 +0000
46@@ -58,3 +58,4 @@
47 lp564920-fix-big-files.patch
48 CVE-2010-2950.patch
49 configure-as-needed.patch
50+mssql_fix_segfault.patch

Subscribers

People subscribed via source and target branches

to all changes: