Package: unhide
Version: 20080519-2

i get a 100% reproducible crash in sched_rr_get_interval().

It crashes because the popen() value in checkps() is not properly
checked for NULL.

In my case, popen() fails with errno set to 24 = (Too many open files)
Indeed, there's an obvious file descriptor leak of /proc/*/task in
isfaked() where a bunch of closedir() are missing.


int isfaked(int pidtmp) {
        int count ;
        struct dirent *ptr;
        DIR *dirp;
        char path[1000] ;

        sprintf(path,"/proc/%i/task",pidtmp);

        errno= 0 ;

        dirp = opendir(path) ;

        count = 0;
        if ( errno == 0) {
                while ((ptr = readdir(dirp)) != NULL) {
                        count++;
                }

                if ( count > 3 ) { return(1) ;}   <===
                else {return(0);}                 <===
        }
        else {return(0);}                         <===
}





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to