~ari-tczew/ubuntu/dapper/fetchmail/fix-CVE-2008-2711

« back to all changes in this revision

Viewing changes to debian/patches/01.fix-netrc-sigsegv.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-02-07 12:12:13 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060207121213-onurwfrzdlzlzxnt
Tags: 6.3.2-2ubuntu1
* Resynchronise with Debian. This brings the new upstream version to dapper
  since upstream support for 6.2 was dropped.
* Drop debian/patches/CVE-2005-4348.dpatch, upstream now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 01.fix-netrc-sigsegv.dpatch by Nico Golde <nico@ngolde.de>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: No description.
 
6
 
 
7
@DPATCH@
 
8
diff -urNad trunk~/netrc.c trunk/netrc.c
 
9
--- trunk~/netrc.c      2006-01-22 15:35:41.000000000 +0100
 
10
+++ trunk/netrc.c       2006-02-01 19:58:16.000000000 +0100
 
11
@@ -314,8 +314,10 @@
 
12
 free_netrc(netrc_entry *a) {
 
13
     while(a) {
 
14
        netrc_entry *n = a->next;
 
15
-       memset(a->password, 0x55, strlen(a->password));
 
16
-       xfree(a->password);
 
17
+       if (a->password != NULL) {
 
18
+               memset(a->password, 0x55, strlen(a->password));
 
19
+               free(a->password);
 
20
+       }
 
21
        xfree(a->login);
 
22
        xfree(a->host);
 
23
        xfree(a);