fix off by one and bump package; makes the package usable. pvalchev@ ok.
This commit is contained in:
parent
ca0c0ed17c
commit
b756759b0f
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2005/06/30 04:28:43 fgsch Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2005/08/23 20:43:40 fgsch Exp $
|
||||
|
||||
COMMENT= "virtual sticky pad system"
|
||||
|
||||
DISTNAME= xpad-2.8
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
CATEGORIES= x11
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xpad/}
|
||||
|
25
x11/xpad/patches/patch-src_fio_c
Normal file
25
x11/xpad/patches/patch-src_fio_c
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-src_fio_c,v 1.1 2005/08/23 20:43:40 fgsch Exp $
|
||||
--- src/fio.c.orig Tue Aug 23 16:46:29 2005
|
||||
+++ src/fio.c Tue Aug 23 16:47:41 2005
|
||||
@@ -170,6 +170,7 @@ gint fio_get_values_from_file (const gch
|
||||
gchar *buf;
|
||||
const gchar *item;
|
||||
va_list ap;
|
||||
+ size_t len;
|
||||
|
||||
buf = fio_get_file (filename);
|
||||
|
||||
@@ -179,9 +180,11 @@ gint fio_get_values_from_file (const gch
|
||||
/* because of the way we look for a matching variable name, which is
|
||||
to look for an endline, the variable name, and a space, we insert a
|
||||
newline at the beginning, so that the first variable name is caught. */
|
||||
- buf = g_realloc (buf, strlen (buf) + 1);
|
||||
- g_memmove (buf + 1, buf, strlen (buf));
|
||||
+ len = strlen(buf);
|
||||
+ buf = g_realloc (buf, len + 2);
|
||||
+ g_memmove (buf + 1, buf, len);
|
||||
buf[0] = '\n';
|
||||
+ buf[len + 1] = '\0';
|
||||
|
||||
va_start (ap, filename);
|
||||
|
Loading…
Reference in New Issue
Block a user