You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "SAY-5 (via GitHub)" <gi...@apache.org> on 2026/08/26 03:50:11 UTC

[PR] Prevent panic in schema type parser on malformed CompositeType [cassandra-gocql-driver]

SAY-5 opened a new pull request, #1964:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1964

   `(*typeParser).parse` indexes `ast.params[count-1]` in the CompositeType branch without checking that any parameters were parsed, so a bare `org.apache.cassandra.db.marshal.CompositeType` (no parameter list) panics with `index out of range [-1]`. `parseParamNodes` has the same problem: after consuming the opening `(` it reads `t.input[t.index]` without a bounds check, so an unterminated type string runs off the end of the input.
   
   Both inputs can reach `parseType` while interpreting `system_schema` validator strings, turning a malformed value into a client crash during schema refresh. This guards the empty-params case and the parameter-list scan so malformed input falls back to the existing unparseable-type path instead of panicking, and adds a regression test.
   
   Fixes #1963.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Prevent panic in schema type parser on malformed CompositeType [cassandra-gocql-driver]

Posted by "SAY-5 (via GitHub)" <gi...@apache.org>.
SAY-5 commented on PR #1964:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1964#issuecomment-6253819537

   Closing in favour of #1965, which covers the same issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Prevent panic in schema type parser on malformed CompositeType [cassandra-gocql-driver]

Posted by "SAY-5 (via GitHub)" <gi...@apache.org>.
SAY-5 closed pull request #1964: Prevent panic in schema type parser on malformed CompositeType
URL: https://github.com/apache/cassandra-gocql-driver/pull/1964


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org