Fixed a SIGSEGV in iso_file_get_old_image_sections() with a

IsoFile from the old session which has not FSrcStreamData 
attached to its IsoStream.
This commit is contained in:
Thomas Schmitt 2009-03-27 14:43:43 +01:00
parent 6cf484442c
commit 41f75ea21f
1 changed files with 13 additions and 2 deletions

View File

@ -3229,8 +3229,19 @@ int iso_file_get_old_image_sections(IsoFile *file, int *section_count,
* to get the sections. This break encapsultation, but safes memory as
* we don't need to store the sections in the IsoFile node.
*/
FSrcStreamData *data = file->stream->data;
ImageFileSourceData *ifsdata = data->src->data;
IsoStream *stream = file->stream;
FSrcStreamData *data;
ImageFileSourceData *ifsdata;
/* <<< ts A90327 : provisory patch on SIGSEGV */
if (stream->class->type[0] != 'f' || stream->class->type[1] != 's' ||
stream->class->type[2] != 'r' || stream->class->type[3] != 'c')
return 0;
/* >>> need a method to get the most original stream */
data = file->stream->data;
ifsdata = data->src->data;
*section_count = ifsdata->nsections;
*sections = malloc(ifsdata->nsections *