Skip to content
Snippets Groups Projects
Commit ac26b3dc authored by girish's avatar girish
Browse files

Consider the type while finding min.

parent 7d1ace7a
No related branches found
No related tags found
No related merge requests found
...@@ -192,8 +192,8 @@ static int lprocfs_wr_identity_upcall(struct file *file, const char *buffer, ...@@ -192,8 +192,8 @@ static int lprocfs_wr_identity_upcall(struct file *file, const char *buffer,
return -EINVAL; return -EINVAL;
} }
if (copy_from_user(kernbuf, buffer, if (copy_from_user(kernbuf, buffer, min_t(unsigned long, count,
min(count, UC_CACHE_UPCALL_MAXPATH - 1))) UC_CACHE_UPCALL_MAXPATH - 1)))
return -EFAULT; return -EFAULT;
/* Remove any extraneous bits from the upcall (e.g. linefeeds) */ /* Remove any extraneous bits from the upcall (e.g. linefeeds) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment