From ccee6e310341021bcf873ee512ae32b0b2a75c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Tue, 16 Sep 2014 03:31:12 +0200 Subject: [PATCH] Fix crash in TQTranslator (cherry picked from commit a944830520dff4031b540cc8fd95906bc5164009) --- src/kernel/qtranslator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/qtranslator.cpp b/src/kernel/qtranslator.cpp index ca160f9..c799e6d 100644 --- a/src/kernel/qtranslator.cpp +++ b/src/kernel/qtranslator.cpp @@ -1015,7 +1015,7 @@ QTranslatorMessage QTranslator::findMessage( const char* context, char con[256]; for ( ;; ) { t >> len; - if ( len == 0 ) + if ( len == 0 || t.atEnd() ) return QTranslatorMessage(); t.readRawBytes( con, len ); con[len] = '\0';