ports/131350: [maintainer-update] fix use of strndup in gnokii
Guido Falsi
mad at madpilot.net
Tue Feb 3 22:40:01 UTC 2009
>Number: 131350
>Category: ports
>Synopsis: [maintainer-update] fix use of strndup in gnokii
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Feb 03 22:40:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Guido Falsi
>Release: FreeBSD 7.1-STABLE i386
>Organization:
none
>Environment:
System: FreeBSD megatron.madpilot.net 7.1-STABLE FreeBSD 7.1-STABLE #14: Sat Jan 24 11:42:24 CET 2009 root at megatron.madpilot.net:/usr/obj/usr/src/sys/MEGATRON i386
>Description:
A function in gnokii happens to use strndup() which is implemented
only in 8.0, so revert it to a simple strdup().
added file:
files/patch-gnokii-gnokii.c
Reported by: ledondo2000 at gmail.com
>How-To-Repeat:
trying to compile gnokii with readline support.
>Fix:
diff -ruN gnokii.old/files/patch-gnokii-gnokii.c gnokii/files/patch-gnokii-gnokii.c
--- gnokii.old/files/patch-gnokii-gnokii.c 1970-01-01 01:00:00.000000000 +0100
+++ gnokii/files/patch-gnokii-gnokii.c 2009-02-03 23:24:44.000000000 +0100
@@ -0,0 +1,11 @@
+--- gnokii/gnokii.c.orig 2009-02-03 23:23:35.000000000 +0100
++++ gnokii/gnokii.c 2009-02-03 23:24:01.000000000 +0100
+@@ -1082,7 +1082,7 @@
+ else
+ len = strlen(input);
+ if (len > 0)
+- argv[argc++] = strndup(input, len);
++ argv[argc++] = strdup(input);
+ input = tmp;
+ } while (input);
+ argv[argc] = NULL;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list