On Fri, 2009-02-27 at 21:56 +0100, Vegard Nossum wrote:
> > +static void proc_fd_write_info(struct file *file, char *info)
> > +{
> > + int max = PROC_FDINFO_MAX;
> > + int p = 0;
> > + if (!info)
> > + return;
> > +
> > + p += snprintf(info+p, max-p, "pos:\t%lli\n", (long long)
> > file->f_pos);
> > + p += snprintf(info+p, max-p, "flags:\t0%o\n", file->f_flags);
>
> Actually, snprintf() is not the right function to use here.
> scnprintf(), perhaps?
Yes, that does look more appropriate. I'll double-check what happens
when we overrun the buffer.
-- Dave
_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers
_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel