diff options
author | joerg <joerg@pkgsrc.org> | 2008-02-02 15:47:52 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-02-02 15:47:52 +0000 |
commit | ed48acb8ad72d3270fac2db4b0773bc5d4fc21a3 (patch) | |
tree | d7b6bbb6713bd3b7a1740ef260bccbffde2ba3d8 /pkgtools | |
parent | f48310aeb775caf979a12a8c26e812f5c29566fb (diff) | |
download | pkgsrc-ed48acb8ad72d3270fac2db4b0773bc5d4fc21a3.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); |