linamh/sys-kernel/win4lin-sources/files/win4lin-sources-2.4.26.cmdlineLeak.patch
2022-11-19 21:49:12 +01:00

12 lines
388 B
Diff

--- linux-2.4/fs/proc/base.c 2004-04-15 07:09:32.000000000 +0100
+++ linux-2.4/fs/proc/base.c.plasmaroo 2004-08-09 23:30:43.869195800 +0100
@@ -187,7 +187,7 @@ static int proc_pid_cmdline(struct task_
if (mm)
atomic_inc(&mm->mm_users);
task_unlock(task);
- if (mm) {
+ if (mm && mm->arg_end) {
int len = mm->arg_end - mm->arg_start;
if (len > PAGE_SIZE)
len = PAGE_SIZE;