diff --git a/fs/procfs/fs_procfsmeminfo.c b/fs/procfs/fs_procfsmeminfo.c index fbdca5d294..a770357595 100644 --- a/fs/procfs/fs_procfsmeminfo.c +++ b/fs/procfs/fs_procfsmeminfo.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -523,6 +524,11 @@ static ssize_t memdump_write(FAR struct file *filep, FAR const char *buffer, break; #if CONFIG_MM_BACKTRACE >= 0 default: + if (!isdigit(buffer[0])) + { + return buflen; + } + pid = atoi(buffer); #endif }