| Submitter | Herton Ronaldo Krzesinski |
|---|---|
| Date | Nov. 26, 2012, 4:57 p.m. |
| Message ID | <1353949160-26803-170-git-send-email-herton.krzesinski@canonical.com> |
| Download | mbox | patch |
| Permalink | /patch/201902/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 47ad266..97bbcdc 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1406,11 +1406,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;