Fix stupid off by one error
authorFlorian Festi <ffesti@redhat.com>
Wed, 3 Feb 2010 14:42:52 +0000 (15:42 +0100)
committerFlorian Festi <ffesti@redhat.com>
Wed, 3 Feb 2010 14:42:52 +0000 (15:42 +0100)
lib/transaction.c

index e0ba1f6..d913258 100644 (file)
@@ -134,7 +134,7 @@ static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev,
     resolved_path = realpath(dirName, mntPoint);
     if (!resolved_path) {
        strncpy(mntPoint, dirName, PATH_MAX);
-       mntPoint[PATH_MAX] = '\0';
+       mntPoint[PATH_MAX-1] = '\0';
     }
     char * end = NULL;
     while (end != mntPoint) {