summaryrefslogtreecommitdiffstats
path: root/recipes/termcap/termcap-2.0.8/011_all_termcap-AAARGH.patch
diff options
context:
space:
mode:
authorCliff Brake <cbrake@bec-systems.com>2010-11-12 00:00:20 -0500
committerCliff Brake <cbrake@bec-systems.com>2010-11-12 00:00:20 -0500
commit3c6efe8f8abc16668ca5e9cdf7a46665dac87172 (patch)
tree642c13416b99e80f0871cdc6668e832e635dfb48 /recipes/termcap/termcap-2.0.8/011_all_termcap-AAARGH.patch
parentc400c874f2ac9233b8a43a73309b6e7907289c54 (diff)
parent13fbe7253c95881ede787004a4c3a1c31502e5c6 (diff)
downloadopenembedded-tested_2010-11-12.tar.gz
Merge branch 'master' into testing-nexttested_2010-11-12testing
Diffstat (limited to 'recipes/termcap/termcap-2.0.8/011_all_termcap-AAARGH.patch')
-rw-r--r--recipes/termcap/termcap-2.0.8/011_all_termcap-AAARGH.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/recipes/termcap/termcap-2.0.8/011_all_termcap-AAARGH.patch b/recipes/termcap/termcap-2.0.8/011_all_termcap-AAARGH.patch
new file mode 100644
index 0000000000..1ba98a0065
--- /dev/null
+++ b/recipes/termcap/termcap-2.0.8/011_all_termcap-AAARGH.patch
@@ -0,0 +1,57 @@
+--- termcap-2.0.8/termcap.c.aaargh
++++ termcap-2.0.8/termcap.c
+@@ -469,10 +469,12 @@
+ if (is_malloced && term_entry) free(term_entry);
+
+ /* Do we already have a buffer? */
+- if (sp) {
+- maxlen = tgetent_bufsize - 1;
+- is_malloced = 0;
+- } else {
++ /* No we don't. I don't care if they pass us a few gigabytes
++ * of storage. We're ignoring it. */
++ /* if (sp) {
++ * maxlen = tgetent_bufsize - 1;
++ * is_malloced = 0;
++ * } else { */
+ /* Count how many bytes we need. */
+ count = strlen(s) + 1;
+ for(i = l; i; i = i->next)
+@@ -483,7 +485,7 @@
+ sp = xmalloc(count);
+ maxlen = count + 32; /* Just a lot. */
+ is_malloced = 1;
+- }
++/* } */
+
+ /* Save buffer into static variable (yuk!) */
+ term_entry = sp;
+@@ -587,14 +589,16 @@
+ s = find_cap(term_entry, cap, '=');
+ if (s == NULL) return(s);
+
++ /* Yawn. Let's ignore bufp, too. */
+ /* Where to put the result. */
+- if (bufp == (char **)NULL) {
++ /* if (bufp == (char **)NULL) { */
+ for(sp = s; *sp != ':' && *sp; sp++) {
+ if (*sp =='\\' && sp[1] == ':') sp++;
+ }
+ ret = xmalloc(sp - s + 1);
+- } else
+- ret = *bufp;
++ /* } else
++ * ret = *bufp;
++ */
+ r = ret;
+
+ /* Translate escaped characters and hat-notation. */
+@@ -628,7 +632,7 @@
+ *r++ = 0;
+
+ /* Do we need to update bufp? */
+- if (bufp) *bufp = r;
++ /* if (bufp) *bufp = r; */
+
+ return(ret);
+ }