Skip to content

Commit 8472857

Browse files
author
Fox Snowpatch
committed
1 parent 4f37907 commit 8472857

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/powerpc/platforms/pseries/lparcfg.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,10 @@ static void parse_system_parameter_string(struct seq_file *m)
418418
w_idx = 0;
419419
idx = 0;
420420
while ((*local_buffer) && (idx < splpar_strlen)) {
421+
if (w_idx >= SPLPAR_MAXLENGTH - 1) {
422+
pr_warn_once("lparcfg: shared processor attribute token is too long\n");
423+
break;
424+
}
421425
workbuffer[w_idx++] = local_buffer[idx++];
422426
if ((local_buffer[idx] == ',')
423427
|| (local_buffer[idx] == '\0')) {

0 commit comments

Comments
 (0)