Oops. "path" was being allocated with 1 byte less than necessary.
authorniemeyer <devnull@localhost>
Wed, 25 Feb 2004 20:02:23 +0000 (20:02 +0000)
committerniemeyer <devnull@localhost>
Wed, 25 Feb 2004 20:02:23 +0000 (20:02 +0000)
CVS patchset: 7131
CVS date: 2004/02/25 20:02:23

lib/rpmlock.c

index 65fcf3d..cb26e90 100644 (file)
@@ -34,7 +34,7 @@ static rpmlock *rpmlock_new(const char *rootdir)
        if (lock) {
                mode_t oldmask = umask(022);
                char *path = (char *)malloc(strlen(rootdir)+
-                                           strlen(RPMLOCK_FILE));
+                                           strlen(RPMLOCK_FILE)+1);
                if (!path) {
                        free(lock);
                        return NULL;