PERFORCE change 117221 for review

Roman Divacky rdivacky at FreeBSD.org
Mon Apr 2 21:04:45 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=117221

Change 117221 by rdivacky at rdivacky_witten on 2007/04/02 21:04:04

	Check return value of copyinstr().
	
	Point hat: rdivacky

Affected files ...

.. //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#21 edit

Differences ...

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#21 (text+ko) ====

@@ -246,6 +246,8 @@
 
 	oldpath = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
 	error = copyinstr(args->filename, oldpath, MAXPATHLEN, NULL);
+	if (error)
+		return (error);	
 
 #ifdef DEBUG
 	if (ldebug(openat))


More information about the p4-projects mailing list