tmpfile security hole

Charles Wilson libtool@cwilson.fastmail.fm
Thu May 17 05:51:00 GMT 2007


So, I'm trying to knock together this libtool patch for Steve, and I 
update newlib to latest.

Boom, on i686-pc-linux-gnu:

../../../../../src/newlib/libc/stdio/tmpfile.c: In function '_tmpfile_r':
../../../../../src/newlib/libc/stdio/tmpfile.c:73: error: 'S_IRUSR' 
undeclared (first use in this function)
../../../../../src/newlib/libc/stdio/tmpfile.c:73: error: (Each 
undeclared identifier is reported only once
../../../../../src/newlib/libc/stdio/tmpfile.c:73: error: for each 
function it appears in.)
../../../../../src/newlib/libc/stdio/tmpfile.c:73: error: 'S_IWUSR' 
undeclared (first use in this function)


Looks like tmpfile.c (and tmpfile64.c) are missing #include 
<sys/stat.h>.  The attached patch fixes it.

--
Chuck

2007-05-17  Charles Wilson  <...>

	* stdio/tmpfile.c: include <sys/stat.h>
	* stdio64/tmpfile64.c: ditto

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tmpfile_fix.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20070517/9c617ae1/attachment.ksh>


More information about the Newlib mailing list