diff options
author | joerg <joerg> | 2008-02-02 15:47:52 +0000 |
---|---|---|
committer | joerg <joerg> | 2008-02-02 15:47:52 +0000 |
commit | b8e04b6271ac8ecd07d0e60e7157de8b2b19cc21 (patch) | |
tree | d7b6bbb6713bd3b7a1740ef260bccbffde2ba3d8 /pkgtools | |
parent | 3b375cb6bdcd1061c4965a4de874a00e7a5ab4d0 (diff) | |
download | pkgsrc-b8e04b6271ac8ecd07d0e60e7157de8b2b19cc21.tar.gz |
Explicitly check that meta data files are regular.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/create/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgtools/pkg_install/files/create/util.c b/pkgtools/pkg_install/files/create/util.c index a542a401b09..351bb0e8cf0 100644 --- a/pkgtools/pkg_install/files/create/util.c +++ b/pkgtools/pkg_install/files/create/util.c @@ -142,6 +142,8 @@ load_memory_file(const char *disk_name, update_ids(file); + if ((file->st.st_mode & S_IFMT) != S_IFREG) + errx(1, "meta data file %s is not regular file", disk_name); if (file->st.st_size > SSIZE_MAX || (file->data = malloc(file->st.st_size)) == NULL) errx(2, "cannot allocate memory for file %s", disk_name); |