Project

General

Profile

Bug #4456 » strftime.patch

ngoto (Naohisa Goto), 07/15/2011 06:41 PM

View differences:

strftime.c (working copy)
210 210
			if (precision > 0 || flags & (BIT_OF(LOCALE_E)|BIT_OF(LOCALE_O))) \
211 211
				goto unknown; \
212 212
		} while (0)
213
#define NEEDS(n) do if (s + (n) >= endp - 1) goto err; while (0)
213
#define NEEDS(n) do if (s >= endp || (n) >= endp - s - 1) goto err; while (0)
214 214
#define FILL_PADDING(i) do { \
215 215
	if (!(flags & BIT_OF(LEFT)) && precision > (i)) { \
216 216
		NEEDS(precision); \