summaryrefslogtreecommitdiff
path: root/textproc/c2html/patches/patch-aa
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/c2html/patches/patch-aa')
-rw-r--r--textproc/c2html/patches/patch-aa27
1 files changed, 27 insertions, 0 deletions
diff --git a/textproc/c2html/patches/patch-aa b/textproc/c2html/patches/patch-aa
new file mode 100644
index 00000000000..acd1295432a
--- /dev/null
+++ b/textproc/c2html/patches/patch-aa
@@ -0,0 +1,27 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/01/29 16:40:58 minskim Exp $
+
+Some platforms (GNU) lack strl* functions.
+Anyways, here the return value is not checked, so toe only
+difference is the trailing \0-padding, which has just very
+minor performance implications.
+
+--- build_ht.c.orig 2007-01-26 18:23:32.000000000 +0100
++++ build_ht.c
+@@ -101,7 +101,7 @@ char **build_ht(char **strings, int nr_o
+ prevline[0] = '\0';
+
+ while (cur_string_no < nr_of_strings) {
+- strlcpy(line, strings[cur_string_no], sizeof line);
++ strncpy(line, strings[cur_string_no], sizeof line);
+
+ if (isdigit(line[0]) && strcmp(line, prevline) != 0) {
+ /* Get the hashcode from the line: */
+@@ -148,7 +148,7 @@ char **build_ht(char **strings, int nr_o
+ cp += strlen(line+i);
+ }
+
+- strlcpy(prevline, line, sizeof(prevline));
++ strncpy(prevline, line, sizeof(prevline));
+ cur_string_no ++;
+ }
+