Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 79672)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp	(revision 79673)
@@ -50,4 +50,5 @@
 #include "CSystemProperties.h"
 
+const ULONG uAllowedLogSize = _256M;
 UIVMLogViewerWidget::UIVMLogViewerWidget(EmbedTo enmEmbedding,
                                          UIActionPool *pActionPool,
@@ -817,4 +818,10 @@
                 strText.append(QString::fromUtf8((char*)data.data(), data.size()));
                 uOffset += data.size();
+                /* Don't read futher if we have reached the allowed size limit: */
+                if (uOffset >= uAllowedLogSize)
+                {
+                    strText.append("\n=========Log file has been truncate as it is too large.======");
+                    break;
+                }
             }
             /* Anything read at all? */
