|
@@ -1409,11 +1409,11 @@ static ssize_t read_flush(struct file *file, char __user *buf,
|
|
|
size_t count, loff_t *ppos,
|
|
|
struct cache_detail *cd)
|
|
|
{
|
|
|
- char tbuf[20];
|
|
|
+ char tbuf[22];
|
|
|
unsigned long p = *ppos;
|
|
|
size_t len;
|
|
|
|
|
|
- sprintf(tbuf, "%lu\n", convert_to_wallclock(cd->flush_time));
|
|
|
+ snprintf(tbuf, sizeof(tbuf), "%lu\n", convert_to_wallclock(cd->flush_time));
|
|
|
len = strlen(tbuf);
|
|
|
if (p >= len)
|
|
|
return 0;
|