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] vfprintf: Fix memory with large width and precision [BZ #19931]


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.


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