~ubuntu-branches/ubuntu/precise/autofs5/precise

« back to all changes in this revision

Viewing changes to debian/patches/autofs-5.0.5-fix-strdup-return-value-check.patch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-07-03 14:35:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110703143546-nej26krjij0rf792
Tags: 5.0.6-0ubuntu1
* New upstream release:
  - Dropped upstream patches 
  - Refreshed debian/patches/17ld.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
autofs-5.0.5 - fix strdup() return value check
2
 
 
3
 
From: Ian Kent <raven@themaw.net>
4
 
 
5
 
Patch posted by Leonardo Chiquitto.
6
 
 
7
 
Fix copy and paste error when checking strdup() return value, originally
8
 
reported by David Binderman in:
9
 
 
10
 
http://bugzilla.novell.com/show_bug.cgi?id=523348
11
 
---
12
 
 
13
 
 CHANGELOG      |    1 +
14
 
 lib/defaults.c |    2 +-
15
 
 2 files changed, 2 insertions(+), 1 deletions(-)
16
 
 
17
 
 
18
 
diff --git a/CHANGELOG b/CHANGELOG
19
 
index 35ac649..3166898 100644
20
 
--- a/CHANGELOG
21
 
+++ b/CHANGELOG
22
 
@@ -21,6 +21,7 @@
23
 
 - dont connect at ldap lookup module init.
24
 
 - fix random selection option.
25
 
 - fix disable timeout.
26
 
+- fix strdup() return value check (Leonardo Chiquitto).
27
 
 
28
 
 03/09/2009 autofs-5.0.5
29
 
 -----------------------
30
 
diff --git a/lib/defaults.c b/lib/defaults.c
31
 
index cb8354d..5ce71b7 100644
32
 
--- a/lib/defaults.c
33
 
+++ b/lib/defaults.c
34
 
@@ -65,7 +65,7 @@ static char *get_env_string(const char *name)
35
 
                return NULL;
36
 
 
37
 
        res = strdup(val);
38
 
-       if (!val)
39
 
+       if (!res)
40
 
                return NULL;
41
 
 
42
 
        return res;