Bug #4469
PROXY protocol bug!
Start date:
2017-07-03
Due date:
% Done:
100%
Estimated time:
Found in version:
last snapshot
Affected Versions:
Description
Hi,
We started today to validate the incorporation of our patch targeting the tuner status in state 1 (#4449). And we have discovered one error in the incorporation of our previous patch for PROXY protocol (#4247).
However, we discovered the error and put here the solution...
http://github.com/tvheadend/tvheadend/blob/master/src/http.c#L1460
The “s” and “c” values are interchanged! Instead of “(s-c)” the correct check is “(c-s)”.
Moreover, the “c” value at the end of the search loop is pointing to the ' ' (space). The you need to increase the pointer (+1).
So the correct code is this:
/* Check length */ c++ if ((c-s) < 8) goto error; if ((c-s) > (delim == ':' ? 39 : 16)) goto error;
Please Jaroslav, can you commit this fix?
Thank you!
D.
History
Updated by Jaroslav Kysela over 7 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|9154ea387346ad1b2864a02397a36bc2cfb9dd5c.