]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/patches/21-anticipate-RLIMIT_FSIZE.patch
Fix CVE-2011-1749: Anticipate RLIMIT_FSIZE (Closes: #629420)
[nfs-utils.git] / debian / patches / 21-anticipate-RLIMIT_FSIZE.patch
1 Index: nfs-utils/support/nfs/nfs_mntent.c
2 ===================================================================
3 --- nfs-utils.orig/support/nfs/nfs_mntent.c     2011-06-07 12:08:56.000000000 +0200
4 +++ nfs-utils/support/nfs/nfs_mntent.c  2011-06-07 12:11:32.000000000 +0200
5 @@ -143,7 +143,11 @@
6         free(m2);
7         free(m3);
8         free(m4);
9 -       return (res < 0) ? 1 : 0;
10 +       if (res < 0)
11 +               return 1;
12 +       else {
13 +               return (fflush(mfp->mntent_fp) == 0) ? 0 : 1;
14 +       }
15  }
16  
17  /* Read the next entry from the file fp. Stop reading at an incorrect entry. */