summaryrefslogtreecommitdiff
path: root/package/uclibc++/patches/patch-fstream_eof
diff options
context:
space:
mode:
Diffstat (limited to 'package/uclibc++/patches/patch-fstream_eof')
-rw-r--r--package/uclibc++/patches/patch-fstream_eof15
1 files changed, 15 insertions, 0 deletions
diff --git a/package/uclibc++/patches/patch-fstream_eof b/package/uclibc++/patches/patch-fstream_eof
new file mode 100644
index 000000000..d60bee8b1
--- /dev/null
+++ b/package/uclibc++/patches/patch-fstream_eof
@@ -0,0 +1,15 @@
+$Id$
+ * fix crash on reading from closed fstream
+
+--- uClibc++-0.2.1.orig/include/fstream 2006-09-04 04:28:09.000000000 +0200
++++ uClibc++-0.2.1/include/fstream 2008-12-14 18:20:27.000000000 +0100
+@@ -201,6 +201,9 @@ namespace std{
+
+ */
+
++ if(fp == 0)
++ return traits::eof();
++
+ if(basic_streambuf<charT,traits>::eback() == 0){
+ //No buffer, so...
+ charT c;