|
@@ -125,7 +125,10 @@ struct cpio_data find_cpio_data(const char *path, void *data,
|
|
|
if ((ch[C_MODE] & 0170000) == 0100000 &&
|
|
|
ch[C_NAMESIZE] >= mypathsize &&
|
|
|
!memcmp(p, path, mypathsize)) {
|
|
|
- *nextoff = (long)nptr - (long)data;
|
|
|
+
|
|
|
+ if (nextoff)
|
|
|
+ *nextoff = (long)nptr - (long)data;
|
|
|
+
|
|
|
if (ch[C_NAMESIZE] - mypathsize >= MAX_CPIO_FILE_NAME) {
|
|
|
pr_warn(
|
|
|
"File %s exceeding MAX_CPIO_FILE_NAME [%d]\n",
|