2001-10-26 18:54:36 -04:00
|
|
|
$OpenBSD: patch-wmtimer_wmtimer_c,v 1.2 2001/10/26 22:54:36 wilfried Exp $
|
|
|
|
--- wmtimer/wmtimer.c.orig Fri Oct 12 02:29:21 2001
|
|
|
|
+++ wmtimer/wmtimer.c Sat Oct 27 00:38:53 2001
|
|
|
|
@@ -83,7 +83,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;
|
|
|
|
@@ -221,7 +221,7 @@ void parseArgs(int argc, char *argv[])
|
|
|
|
mode = CHRONO_ACTIVE;
|
2001-01-11 17:45:21 -05:00
|
|
|
break;
|
|
|
|
case 'e':
|
2001-10-26 18:54:36 -04:00
|
|
|
- strcpy(command, argv[argIndex+1]);
|
|
|
|
+ strlcpy(command, argv[argIndex+1], sizeof(command));
|
|
|
|
action = COMMAND;
|
2001-01-11 17:45:21 -05:00
|
|
|
break;
|
|
|
|
case 't':
|
2001-10-26 18:54:36 -04:00
|
|
|
@@ -552,7 +552,7 @@ void callback(GtkWidget * widget, gpoint
|
|
|
|
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));
|
2001-01-11 17:45:21 -05:00
|
|
|
|
2001-10-26 18:54:36 -04:00
|
|
|
hour = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (spinner1));
|
|
|
|
min = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (spinner2));
|