From 0b89b79c50d9a0a22f23d1ba40a73f9f3cd54da2 Mon Sep 17 00:00:00 2001 From: crvi Date: Wed, 7 Apr 2021 04:00:30 +0530 Subject: core: fix garbage in CDATA values for shorter texts This change properly null terminates the CDATA values. For shorter CDATA values, this fix is mandatory to override the token buffer text which contains the previous token value of 'lexbuf + lexer->lexbuf_pos, "]]>", 3) == 0) { lexer->lexbuf_pos += 3; lexer->lex_mode = DATA; + tok[tok_pos] = '\0'; return T_CDATA_STOP; } else { tok[tok_pos] = c; -- cgit v1.2.1