$OpenBSD: patch-wmtimer_wmtimer_c,v 1.4 2010/03/25 06:22:41 jasper Exp $ --- wmtimer/wmtimer.c.orig Thu Jan 29 03:45:48 2004 +++ wmtimer/wmtimer.c Wed Mar 24 17:15:25 2010 @@ -84,7 +84,7 @@ configState configSt; int main(int argc, char *argv[]) { int prevSec = 0; - long now; + time_t now; struct tm *thisTime; int wminet_mask_width = 64; int wminet_mask_height = 64; @@ -239,7 +239,7 @@ void parseArgs(int argc, char *argv[]) action.bell = 1; break; case 'e': - strcpy(command, argv[argIndex+1]); + strlcpy(command, argv[argIndex+1], sizeof(command)); action.command = 1; break; case 't': @@ -599,7 +599,7 @@ void callback(GtkWidget * widget, gpointer data) else if ((char *) data == "ok") { if (tmpAction.command) - strcpy(command, gtk_entry_get_text(GTK_ENTRY (entry))); + strlcpy(command, gtk_entry_get_text(GTK_ENTRY (entry)), sizeof(command)); hour = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (spinner1)); min = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (spinner2));