mirror of
https://github.com/rizinorg/rizin.git
synced 2026-10-12 02:21:57 +00:00
fix null pointer dereference in rz_name_filter2() in librz/util/name.c (#6846)
Co-authored-by agent: pi/deepseek-flash-guan
This commit is contained in:
@@ -95,6 +95,9 @@ RZ_API char *rz_name_filter2(const char *name, bool strict) {
|
||||
name++;
|
||||
}
|
||||
char *res = rz_str_dup(name);
|
||||
if (!res) {
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; res[i]; i++) {
|
||||
if (!rz_name_validate_char(res[i], strict)) {
|
||||
res[i] = '_';
|
||||
|
||||
Reference in New Issue
Block a user