ref: c10d17a9f0c84746e55f939a2a2724c47090c96e
parent: 0ec8eb7fc4df54a579d17ebb46b2a226928d062b
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Sep 16 16:51:54 EDT 2020
don't treat every file as a container
--- a/iso.c
+++ b/iso.c
@@ -1,6 +1,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
+#include <ctype.h>
#define MIN(a,b) ((a)<=(b)?(a):(b))
@@ -1483,6 +1484,9 @@
b->version = d[0];
b->flags = d[1]<<16 | d[2]<<8 | d[3];
b->dstart += 4;
+ }else if(!isalnum(b->type&0xff) || !isalnum((b->type>>8)&0xff) || !isalnum((b->type>>16)&0xff) || !isalnum((b->type>>24)&0xff)){
+ werrstr("not an ISO container");
+ return -1;
}
b->dsz -= b->dstart - start;