]> granicus.if.org Git - psmisc/commitdiff
fuser: increase mpoint length of for octal escape
authorJaromír Cápík <jcapik@users.sourceforge.net>
Mon, 25 Apr 2016 01:25:38 +0000 (11:25 +1000)
committerCraig Small <csmall@enc.com.au>
Mon, 25 Apr 2016 01:25:38 +0000 (11:25 +1000)
The mount point is set to PATH_MAX but if octal escaping is used
then it will exceed this limit.

Fixes rhbz#1078887 (no url, its a restricted access bug)

References:
 https://sourceforge.net/p/psmisc/patches/37/

Signed-off-by: Craig Small <csmall@enc.com.au>
ChangeLog
src/fuser.c

index 8723d9252a6c0e6ef84b35a70b76918608a24631..ac943ef83a31372df38a341948fd345eb1e6d0bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 Changes in 22.22
 ================
+       * fuser: increase path length for octal escaping SF [#37]
        * Make usage of linked lists of devices found in
          /proc/self/mountinfo optional
        * Make timeout() in timeout.c work with shared mmap to
index 380046f0efab1d9cd8684af949df58b1ef5dcea0..5e63de734f0f444056529fabedf1d1fb0bd92215 100644 (file)
@@ -1852,7 +1852,7 @@ static void clear_mntinfo(void)
 
 static void init_mntinfo(void)
 {
-       char mpoint[PATH_MAX + 1];
+       char mpoint[PATH_MAX*4 + 1]; // octal escaping takes 4 chars per 1 char
        int mid, parid, max = 0;
        uint maj, min;
        list_t sort;