Opened 12 years ago
Closed 10 years ago
#11844 closed Patch - Bug Fix (fixed)
Negative values in Services API requests can cause segfaults
Reported by: | Owned by: | paulh | |
---|---|---|---|
Priority: | minor | Milestone: | 0.28 |
Component: | MythTV - Services API - Backend | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
To Duplicate
Start the backend with -v upnp (just for detail) From a browser send: <hostname>:6544/Dvr/GetRecordScheduleList?StartIndex=-1
Backtrace/version and backend log attached.
Obvious workaround, don't send negative values.
I'd be glad to add a patch that takes the absolute value of nStartIndex and nCount, or range checkes their values.
But that only solves this case. Suggest that no input should crash the BE.
Attachments (3)
Change History (7)
by , 12 years ago
Attachment: | gdb-mythbackend-20903.txt added |
---|
by , 12 years ago
Attachment: | mythbackend.20130911180803.20903.log added |
---|
by , 10 years ago
Attachment: | NegativeStartIndexGuard.patch.v0 added |
---|
comment:1 by , 10 years ago
Added fixes for all StartIndex parameters to prevent a -1 value from causing a segfault. Not sure why it exists in Channel::GetChannelInfoList because it doesn't seem to have any affect. Tested on v0.28-pre-3221-g7292e21 with values of -1, 0, 1 and no StartIndex parameter.
comment:2 by , 10 years ago
Milestone: | unknown → 0.28 |
---|---|
Type: | Bug Report - Crash → Patch - Bug Fix |
comment:3 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → accepted |
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
BT on v0.28-pre-84-g5b6f322