Opened 19 years ago
Closed 19 years ago
#2607 closed defect (fixed)
potential NULL dereference in dbox2recorder.cpp
| Reported by: | Owned by: | danielk | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.21 |
| Component: | mythtv | Version: | head |
| Severity: | low | Keywords: | |
| Cc: | Ticket locked: | no |
Description
Spotted while looking through the code: in DBox2Recorder::OpenStream(), if
struct hostent * hp = gethostbyname(ip);
fails, it will set hp = NULL. A few lines down:
adr.sin_addr.s_addr = ((struct in_addr *)(hp->h_addr))->s_addr;
which will then dereference it. Untested patch attached.
Attachments (1)
Change History (3)
Note:
See TracTickets
for help on using tickets.

(In [11613]) Fixes #2607. Adds check for null before dereference in DBOX2 Recorder, problem discovered by jim at jtan com.