From kde-commits Sun Jul 12 18:11:58 2009 From: Maks Orlovich Date: Sun, 12 Jul 2009 18:11:58 +0000 To: kde-commits Subject: KDE/kdelibs/khtml/css Message-Id: <1247422318.181879.23694.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=124742232606697 SVN commit 995431 by orlovich: Fix a bug in switching to post-EOF buffer when CSS has embedded nulls. Fixes crashes on appleinsider.cpp (why do so many KDE users read THAT?) Mucho credit to Frank Reininghaus for yet another phenomenal testcasing job, which was an enormous help in sorting this out. BUG: 195501 M +3 -1 cssparser.cpp --- trunk/KDE/kdelibs/khtml/css/cssparser.cpp #995430:995431 @@ -2902,8 +2902,10 @@ #define YY_START ((yy_start - 1) / 2) #define yyterminate()\ do { \ - if (yy_act == YY_END_OF_BUFFER) \ + if (yy_act == YY_END_OF_BUFFER) { \ yy_c_buf_p = postEofBuf; \ + yy_hold_char = 0; /* first char of the postEndOf to 'restore' */ \ + } \ yyTok = END; return yyTok; \ } while (0) #define YY_FATAL_ERROR(a) qFatal(a)