File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -425,10 +425,11 @@ struct file_handle *iso9660_open(struct volume *vol, const char *path) {
425425 uint64_t total_size = entry -> extent_size .little ;
426426 struct iso9660_directory_entry * e = entry ;
427427
428+ // load_name returns false on the ISO-9660 fallback path but
429+ // still populates the buffer; treat an empty buffer as the only
430+ // "no usable name" case.
428431 char base_name [256 ];
429- if (!load_name (base_name , sizeof (base_name ), entry )) {
430- base_name [0 ] = '\0' ;
431- }
432+ load_name (base_name , sizeof (base_name ), entry );
432433
433434 while (e -> flags & ISO9660_FLAG_MULTI_EXTENT ) {
434435 struct iso9660_directory_entry * next = iso9660_next_entry (e , buffer_end );
@@ -438,8 +439,8 @@ struct file_handle *iso9660_open(struct volume *vol, const char *path) {
438439 // the file identifier of the first record. Refuse to splice
439440 // in unrelated entries.
440441 char next_name [256 ];
441- if (! load_name (next_name , sizeof (next_name ), next )
442- || strcmp (base_name , next_name ) != 0 ) {
442+ load_name (next_name , sizeof (next_name ), next );
443+ if ( base_name [ 0 ] == '\0' || strcmp (base_name , next_name ) != 0 ) {
443444 break ;
444445 }
445446 e = next ;
You can’t perform that action at this time.
0 commit comments