[PATCH] vfprintf: Fix memory with large width and precision [BZ #19931]

Paul Eggert eggert@cs.ucla.edu
Thu Apr 14 16:17:00 GMT 2016


On 04/14/2016 05:22 AM, Florian Weimer wrote:
> +	  /* Deallocate any previously allocated buffer because it is
> +	     too small.  */
> +	  if (__glibc_unlikely (workstart != NULL))
> +	    free (workstart);
>   	  if (__glibc_unlikely (prec >= INT_MAX / sizeof (CHAR_T) - 32))

Why don't we need a 'workstart = NULL' after freeing workstart, which is 
the pattern used elsewhere? If it's not needed here, it'd be helpful to 
have a comment saying why not.



More information about the Libc-alpha mailing list