| 60 | | if ((*walk) == 0 || ((*walk) & 0x3ff) != 0) { |
| | 61 | /* |
| | 62 | * Check if coreboot last image size is 0 or not a multiple of 1k or |
| | 63 | * bigger than the chip or if the pointers to vendor ID or mainboard ID |
| | 64 | * are outside the image of if the start of ID strings are nonsensical |
| | 65 | * (nonprintable and not \0). |
| | 66 | */ |
| | 67 | if ((*walk) == 0 || ((*walk) & 0x3ff) != 0 || *walk > size || |
| | 68 | *(walk - 1) > size || *(walk - 2) > size || |
| | 69 | (!isprint((const char *)(bios + size - *(walk - 1))) && |
| | 70 | ((const char *)(bios + size - *(walk - 1)))) || |
| | 71 | (!isprint((const char *)(bios + size - *(walk - 2))) && |
| | 72 | ((const char *)(bios + size - *(walk - 2))))) { |