This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] vfprint: validate nargs and argument-based offsets


On 03/02/2012 11:53 AM, Kees Cook wrote:
> Out of about 20 failure conditions, only 3 seem to set errno:

I don't think that's counting things correctly.  For example:

		workstart = (CHAR_T *) malloc (needed);
		if (workstart == NULL)
		  {
		    done = -1;
		    goto all_done;
		  }

This doesn't set errno directly, but it reuses the errno value that
malloc set, which is fine; and yet your 'grep' script miscounts this
as not setting errno.

> Perhaps this could be an additional patch, after vfprintf-nargs is
> committed?

Quite possibly there are other failures in vfprintf where errno is
not properly set, and these bugs could be fixed by an additional patch,
but it'd be nice if the nargs-validation patch did not introduce
a further bug in this area.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]