rpmsgdev: devpath may exceed RPMSG_NAME_SIZE
Signed-off-by: yintao <yintao@xiaomi.com>
This commit is contained in:
parent
190fdd18e2
commit
f45eaa608d
|
@ -1160,6 +1160,9 @@ int rpmsgdev_register(FAR const char *remotecpu, FAR const char *remotepath,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
DEBUGASSERT(strlen(remotepath) + RPMSGDEV_NAME_PREFIX_LEN <=
|
||||
RPMSG_NAME_SIZE);
|
||||
|
||||
dev = kmm_zalloc(sizeof(*dev));
|
||||
if (dev == NULL)
|
||||
{
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
* Pre-processor definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define RPMSGDEV_NAME_PREFIX "rpmsgdev-"
|
||||
#define RPMSGDEV_NAME_PREFIX_LEN 9
|
||||
#define RPMSGDEV_NAME_PREFIX "rpdev-"
|
||||
#define RPMSGDEV_NAME_PREFIX_LEN 6
|
||||
|
||||
#define RPMSGDEV_OPEN 1
|
||||
#define RPMSGDEV_CLOSE 2
|
||||
|
|
Loading…
Reference in New Issue