openbsd-ports/www/php4/patches/patch-ext_calendar_calendar_c
2003-11-15 18:11:35 +00:00

13 lines
513 B
Plaintext

$OpenBSD: patch-ext_calendar_calendar_c,v 1.1 2003/11/15 18:11:35 avsm Exp $
--- ext/calendar/calendar.c.orig 2003-11-14 08:29:51.000000000 +0000
+++ ext/calendar/calendar.c 2003-11-14 08:30:16.000000000 +0000
@@ -276,7 +276,7 @@ PHP_FUNCTION(cal_from_jd)
Z_LVAL_PP(jd),
&year, &month, &day);
- sprintf(date, "%i/%i/%i", month, day, year);
+ snprintf(date, sizeof date, "%i/%i/%i", month, day, year);
add_assoc_string(return_value, "date", date, 1);
add_assoc_long(return_value, "month", month);