openbsd-ports/misc/wmtimer/patches/patch-wmtimer_wmtimer_c
wilfried 426cc17b2c update to wmtimer-2.4
- Multi-threaded support added. Clock, timer and chronograph continue
  running while configure window is open.
- A couple small changes to the dockapp to make the characters 'I'
  and ':' appear better.
- Major rewrite/cleanup of the code from top to bottom.
- Improved configure state tracking. Program would give errors and
  crash if you clicked on the dockapp multiple times to open the
  config window.
- Added support for selecting font color on the command line.
2001-10-26 22:54:36 +00:00

31 lines
1.0 KiB
Plaintext

$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;
break;
case 'e':
- strcpy(command, argv[argIndex+1]);
+ strlcpy(command, argv[argIndex+1], sizeof(command));
action = COMMAND;
break;
case 't':
@@ -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));
hour = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (spinner1));
min = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON (spinner2));