summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/procps/procps-3.2.7/pagesz-not-constant.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/procps/procps-3.2.7/pagesz-not-constant.patch')
-rw-r--r--meta/recipes-extended/procps/procps-3.2.7/pagesz-not-constant.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/recipes-extended/procps/procps-3.2.7/pagesz-not-constant.patch b/meta/recipes-extended/procps/procps-3.2.7/pagesz-not-constant.patch
new file mode 100644
index 0000000000..8e9e1ebfe1
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.7/pagesz-not-constant.patch
@@ -0,0 +1,22 @@
1Index: procps-3.2.1/proc/devname.c
2===================================================================
3--- procps-3.2.1.orig/proc/devname.c 2004-03-18 05:43:50.000000000 +1100
4+++ procps-3.2.1/proc/devname.c 2005-04-02 10:40:17.462138000 +1000
5@@ -227,7 +227,7 @@
6
7 /* number --> name */
8 unsigned dev_to_tty(char *restrict ret, unsigned chop, dev_t dev_t_dev, int pid, unsigned int flags) {
9- static char buf[PAGE_SIZE];
10+ static char buf[4096];
11 char *restrict tmp = buf;
12 unsigned dev = dev_t_dev;
13 unsigned i = 0;
14@@ -249,7 +249,7 @@
15 if((flags&ABBREV_TTY) && !strncmp(tmp,"tty", 3) && tmp[3]) tmp += 3;
16 if((flags&ABBREV_PTS) && !strncmp(tmp,"pts/", 4) && tmp[4]) tmp += 4;
17 /* gotta check before we chop or we may chop someone else's memory */
18- if(chop + (unsigned long)(tmp-buf) <= sizeof buf)
19+ if(chop + (unsigned long)(tmp-buf) < sizeof buf)
20 tmp[chop] = '\0';
21 /* replace non-ASCII characters with '?' and return the number of chars */
22 for(;;){