Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2007 15:27:48 GMT
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 119341 for review
Message-ID:  <200705061527.l46FRmVp032174@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=119341

Change 119341 by rdivacky@rdivacky_witten on 2007/05/06 15:27:13

	Check whether copyinstr() succeeded.
	
	Pointed out by: rwatson

Affected files ...

.. //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_file.c#4 edit

Differences ...

==== //depot/projects/soc2007/rdivacky/linux_at/sys/compat/linux/linux_file.c#4 (text+ko) ====

@@ -188,6 +188,10 @@
 
 	path = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
 	error = copyinstr(args->filename, path, MAXPATHLEN, NULL);
+	if (error) {
+		free(path, M_TEMP);
+		return (error);
+	}
 
     	if (args->flags & LINUX_O_CREAT)
 		LCONVPATH_SEG(td, path, &newpath, 1, UIO_SYSSPACE);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705061527.l46FRmVp032174>