Check access to file contents before adding it to public iso tree.

This commit is contained in:
Vreixo Formoso
2007-12-29 16:34:17 +01:00
parent 5c22069d19
commit 71cd3ccb89
2 changed files with 8 additions and 2 deletions

View File

@ -159,6 +159,12 @@ int iso_file_source_stream_new(IsoFileSource *src, IsoStream **stream)
if (S_ISDIR(info.st_mode)) {
return ISO_FILE_IS_DIR;
}
/* check for read access to contents */
r = iso_file_source_access(src);
if (r < 0) {
return r;
}
str = malloc(sizeof(IsoStream));
if (str == NULL) {