Correcting handling of invalide name and file sizes in programs.c
@@ -85,12 +85,12 @@ int programs_decode(vm_map_t *kmap, vm_object_t *kernel)
fs = programs_a2i(cpio->c_filesize);
if (fs == -EINVAL) {
lib_printf("programs: invalid filesize");
- continue;
+ return -EINVAL;
}
ns = programs_a2i(cpio->c_namesize);
if (ns == -EINVAL) {
lib_printf("programs: invalid namesize");
- continue;
+ return -EINVAL;
}
cpio = (void *)(((ptr_t)cpio + sizeof(cpio_newc_t) + ns + CPIO_PAD) & ~CPIO_PAD);
