diff --git a/src/vteseq.cc b/src/vteseq.cc
index 58791b95..b94588ab 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -1812,9 +1812,6 @@ VteTerminalPrivate::parse_sgr_38_48_parameters(vte::parser::Params const& params
 
 		switch (param0) {
                 case 2: {
-                        if (G_UNLIKELY(*index + 3 >= n_params))
-				return -1;
-
                         long param1, param2, param3;
                         if (G_UNLIKELY(!params.number_at_unchecked(*index + 1, param1) ||
                                        !params.number_at_unchecked(*index + 2, param2) ||
@@ -1828,7 +1825,7 @@ VteTerminalPrivate::parse_sgr_38_48_parameters(vte::parser::Params const& params
                 }
                 case 5: {
                         long param1;
-                        if (G_UNLIKELY(!params.number_at(*index + 1, param1)))
+                        if (G_UNLIKELY(!params.number_at_unchecked(*index + 1, param1)))
                                 return -1;
 
                         if (G_UNLIKELY(param1 < 0 || param1 >= 256))
@@ -1871,9 +1868,6 @@ VteTerminalPrivate::seq_character_attributes(vte::parser::Params const& params)
                         {
                                 unsigned int index = 1;
                                 auto color = parse_sgr_38_48_parameters(subparams, &index);
-                                /* Bail out on additional colon-separated values. */
-                                if (G_UNLIKELY(index != subparams.size() - 1))
-                                        continue;
                                 if (G_LIKELY (color != -1)) {
                                         if (param0 == 38) {
                                                 m_defaults.attr.fore = color;
@@ -1986,9 +1980,6 @@ VteTerminalPrivate::seq_character_attributes(vte::parser::Params const& params)
 
 					unsigned int index = 0;
                                         color = parse_sgr_38_48_parameters(subparams, &index);
-					/* Bail out on additional colon-separated values. */
-                                        if (G_UNLIKELY(index != subparams.size() - 1))
-						break;
 				} else {
 					break;
 				}
