View | Details | Raw Unified | Return to bug 83222
Collapse All | Expand All

(-)file_not_specified_in_diff (-9 / +18 lines)
Line  Link Here
0
-- linux-2.4.21/fs/binfmt_aout.c.orig
0
++ linux-2.4.21/fs/binfmt_aout.c
Lines 225-230 static unsigned long * create_aout_table Link Here
225
 #endif
225
 #endif
226
 	put_user(argc,--sp);
226
 	put_user(argc,--sp);
227
 	current->mm->arg_start = (unsigned long) p;
227
 	current->mm->arg_start = (unsigned long) p;
228
	current->mm->arg_end = 0UL;
229
	current->mm->env_start = 0UL;
230
	current->mm->env_end = 0UL;
228
 	while (argc-->0) {
231
 	while (argc-->0) {
229
 		char c;
232
 		char c;
230
 		put_user(p,argv++);
233
 		put_user(p,argv++);
231
-- linux-2.4.21/fs/binfmt_elf.c.orig
234
++ linux-2.4.21/fs/binfmt_elf.c
Lines 222-227 create_elf_tables(char *p, int argc, int Link Here
222
 	__put_user((elf_addr_t)argc,--sp);
222
 	__put_user((elf_addr_t)argc,--sp);
223
 	current->mm->arg_start = (unsigned long) p;
223
 	current->mm->arg_start = (unsigned long) p;
224
	current->mm->arg_end = 0UL;
225
	current->mm->env_start = 0UL;
226
	current->mm->env_end = 0UL;
224
 	while (argc-->0) {
227
 	while (argc-->0) {
225
 		__put_user((elf_caddr_t)(unsigned long)p,argv++);
228
 		__put_user((elf_caddr_t)(unsigned long)p,argv++);
226
 		len = strnlen_user(p, PAGE_SIZE*MAX_ARG_PAGES);
229
 		len = strnlen_user(p, PAGE_SIZE*MAX_ARG_PAGES);
Lines 1404-1410 static int elf_core_dump(long signr, str Link Here
1404
 	/* first copy the parameters from user space */
1407
 	/* first copy the parameters from user space */
1405
 	memset(&psinfo, 0, sizeof(psinfo));
1408
 	memset(&psinfo, 0, sizeof(psinfo));
1406
	{
1409
	if (current->mm->arg_end) {
1407
 		int i, len;
1410
 		int i, len;
1408
 		len = current->mm->arg_end - current->mm->arg_start;
1411
 		len = current->mm->arg_end - current->mm->arg_start;
1409
-- linux-2.4.21/fs/proc/base.c.orig
1412
++ linux-2.4.21/fs/proc/base.c
Lines 164-174 static int proc_pid_environ(struct task_ Link Here
164
 	task_lock(task);
164
 	task_lock(task);
165
 	mm = task->mm;
165
 	mm = task->mm;
166
	if (mm)
166
	if (mm) {
167
		atomic_inc(&mm->mm_users);
167
		if (mm->env_end)
168
			atomic_inc(&mm->mm_users);
169
		else
170
			mm = NULL;
171
	}
168
 	task_unlock(task);
172
 	task_unlock(task);
169
 	if (mm) {
173
 	if (mm) {
170
		unsigned int len = mm->env_end - mm->env_start;
174
		int len = mm->env_end - mm->env_start;
171
 		if (len > PAGE_SIZE)
175
 		if (len > PAGE_SIZE)
172
 			len = PAGE_SIZE;
176
 			len = PAGE_SIZE;
173
 		res = access_process_vm(task, mm->env_start, buffer, len, 0);
177
 		res = access_process_vm(task, mm->env_start, buffer, len, 0);
Lines 205-212 static int proc_pid_cmdline(struct task_ Link Here
205
 		// If the nul at the end of args has been overwritten, then
209
 		// If the nul at the end of args has been overwritten, then
206
 		// assume application is using setproctitle(3).
210
 		// assume application is using setproctitle(3).
207
		if ( res > 0 && buffer[res-1] != '\0' )
211
		if (res > 0 && buffer[res-1] != '\0' && mm->env_end) {
208
		{
209
 			len = strnlen( buffer, res );
212
 			len = strnlen( buffer, res );
210
 			if ( len < res )
213
 			if ( len < res )
211
 			{
214
 			{

Return to bug 83222