Project

General

Profile

Actions

Bug #4469

closed

PROXY protocol bug!

Added by DSA APF almost 8 years ago. Updated almost 8 years ago.

Status:
Fixed
Priority:
Normal
Category:
SAT>IP
Target version:
-
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.

Actions

Also available in: Atom PDF