openbsd-ports/audio/libworkman/patches/patch-wm_helpers_c
wilfried 437a12bbe3 Import of libworkman-1.4
multi-platform CD-Player library for creating various
CD-Player-UIs.

ok naddy@
2001-02-06 11:50:20 +00:00

22 lines
719 B
Plaintext

$OpenBSD: patch-wm_helpers_c,v 1.1.1.1 2001/02/06 11:50:21 wilfried Exp $
--- wm_helpers.c.orig Sun Mar 7 09:36:41 1999
+++ wm_helpers.c Mon Feb 5 14:52:48 2001
@@ -30,7 +30,7 @@ static char wm_helpers_id[] = "$Id: wm_h
#include <stdio.h>
#include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <errno.h>
#include <stdarg.h>
#include <sys/time.h>
@@ -63,7 +63,7 @@ char *wm_libver_number( void )
s = malloc(10);
/* this is not used very often, so don't care about speed...*/
- sprintf(s, "%d.%d.%d", wm_libver_major(), wm_libver_minor(), wm_libver_pl());
+ snprintf(s, sizeof(s), "%d.%d.%d", wm_libver_major(), wm_libver_minor(), wm_libver_pl());
return s;
} /* wm_libver_number() */