[PATCH] allow NAME_SIZE > SYSFS_PATH_MAX
NAME_SIZE is too small for some configurations. This patch allows more or longer names, it just keeps the stack in a sane state.
This commit is contained in:
@@ -52,7 +52,7 @@ int udevdb_add_dev(const char *path, const struct udevice *dev)
|
||||
if ((path == NULL) || (dev == NULL))
|
||||
return -ENODEV;
|
||||
|
||||
memset(keystr, 0, NAME_SIZE);
|
||||
memset(keystr, 0, SYSFS_PATH_MAX);
|
||||
strfieldcpy(keystr, path);
|
||||
key.dptr = keystr;
|
||||
key.dsize = strlen(keystr) + 1;
|
||||
|
||||
Reference in New Issue
Block a user