]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/procps/procps-3.2.1/pagesz-not-constant.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / procps / procps-3.2.1 / pagesz-not-constant.patch
1 Index: 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(;;){