| Anonymous | Login | Signup for a new account | 11-10-2008 11:07 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0001064 | [BusyBox] Networking Support | minor | always | 10-05-06 01:54 | 10-15-06 11:22 | ||||
| Reporter | ydirson | View Status | public | ||||||
| Assigned To | BusyBox | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | 1.2.x | ||||||
| Summary | 0001064: telnetd segfault when using devpts and /dev/pts is not mounted | ||||||||
| Description | In telnetd.c:getpty(), the return value of ptsname() is passed to strcpy() without a check, while it is documented as returning NULL on error. This happens for example if the kernel was compiled with UNIX98 PTY support (so openning /dev/ptmx works), and /dev/pts is not mounted. | ||||||||
| Additional Information |
Changing that part of the code to the following does catch the error. It would surely be better to use syslog() to report the error, though. if (p > 0) { char* pts; grantpt(p); unlockpt(p); pts = ptsname(p); if (!pts) { fprintf(stderr, "Failed to get pts: %s\n", strerror(errno)); return -1; } strcpy(line, ptsname(p)); return(p); } |
||||||||
| Attached Files | |||||||||
|
|
|||||||||
| Copyright © 2000 - 2006 Mantis Group |