Index: /trunk/src/VBox/Runtime/r3/linux/sysfs.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/linux/sysfs.cpp	(revision 60423)
+++ /trunk/src/VBox/Runtime/r3/linux/sysfs.cpp	(revision 60424)
@@ -234,5 +234,16 @@
         && pcchRead)
         *pcchRead = cchRead;
-
+    if (RT_SUCCESS(rc))
+    {
+        /* Check for EOF */
+        uint64_t offCur = 0;
+        uint64_t offEnd = 0;
+        rc = RTFileSeek(hFile, 0, RTFILE_SEEK_CURRENT, &offCur);
+        if (RT_SUCCESS(rc))
+            rc = RTFileSeek(hFile, 0, RTFILE_SEEK_END, &offEnd);
+        if (   RT_SUCCESS(rc)
+            && offEnd > offCur)
+            rc = VERR_BUFFER_OVERFLOW;
+    }
     return rc;
 }
@@ -262,5 +273,4 @@
         {
             /* Check for EOF */
-            char     ch;
             uint64_t offCur = 0;
             uint64_t offEnd = 0;
