]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
Fix abs path helper function
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 8 Dec 2011 12:37:56 +0000 (10:37 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 8 Dec 2011 13:15:24 +0000 (11:15 -0200)
libkmod/libkmod-util.c

index f855bc7b697ae7c3b6f7fbc32181677eb3f62ed2..2e58c91e1d3fb368267821b19f5a5b84f05af043 100644 (file)
@@ -245,8 +245,8 @@ char *path_make_absolute_cwd(const char *p)
                return NULL;
        }
 
-       r[plen] = '/';
-       memcpy(&r[plen + 1], p, plen + 1);
+       r[cwdlen] = '/';
+       memcpy(&r[cwdlen + 1], p, plen + 1);
 
        return r;
 }