pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/lsof/files



Module Name:    pkgsrc
Committed By:   tnn
Date:           Wed May 25 09:48:58 UTC 2022

Modified Files:
        pkgsrc/sysutils/lsof/files: rnmt.c

Log Message:
lsof: don't consume buffer space if we didn't add a '/'


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/lsof/files/rnmt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/lsof/files/rnmt.c
diff -u pkgsrc/sysutils/lsof/files/rnmt.c:1.2 pkgsrc/sysutils/lsof/files/rnmt.c:1.3
--- pkgsrc/sysutils/lsof/files/rnmt.c:1.2       Wed May 25 09:37:54 2022
+++ pkgsrc/sysutils/lsof/files/rnmt.c   Wed May 25 09:48:58 2022
@@ -192,8 +192,8 @@ build_path(char **buf, size_t *remaining
        if (lnc->lnc_plnc != NULL) {
                **buf = '/';
                (*buf)++;
+               remaining--;
        }
-       remaining--;
        len = lnc->lnc_nlen;
        if (*remaining < len)
                len = *remaining;



Home | Main Index | Thread Index | Old Index