Skip to content

setattr crashed when given empty character vector as name or value #2386

@hatal175

Description

@hatal175

Trying to run setattr(numeric(1), "class", character(0)) or setattr(numeric(1), character(0), "value") crashes because the setattrib c function doesn't check if the value or name string vector actually has length > 0 before accessing it with STRING_ELT.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions