diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ot_http.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ot_http.c b/src/ot_http.c index 70176c3..20ec1a6 100644 --- a/src/ot_http.c +++ b/src/ot_http.c | |||
| @@ -634,7 +634,7 @@ static ssize_t http_handle_announce(const int64_t sock, struct ot_workstruct | |||
| 634 | break; | 634 | break; |
| 635 | case 1: /* matched "port" */ | 635 | case 1: /* matched "port" */ |
| 636 | len = urlencoded_parse(&read_ptr, write_ptr = read_ptr, ws->request + ws->request_size, SCAN_SEARCHPATH_VALUE); | 636 | len = urlencoded_parse(&read_ptr, write_ptr = read_ptr, ws->request + ws->request_size, SCAN_SEARCHPATH_VALUE); |
| 637 | if ((len <= 0) || scan_int(write_ptr, len, &tmp) || (tmp > 0xffff)) | 637 | if ((len <= 0) || scan_int(write_ptr, len, &tmp) || (tmp < 0) || (tmp > 0xffff)) |
| 638 | HTTPERROR_400_PARAM; | 638 | HTTPERROR_400_PARAM; |
| 639 | port = htons((uint16_t)tmp); | 639 | port = htons((uint16_t)tmp); |
| 640 | OT_SETPORT(&ws->peer, &port); | 640 | OT_SETPORT(&ws->peer, &port); |
