bugfix: we were checking the wrong thing to see if 'reason'

was out of range


svn:r1186
This commit is contained in:
Roger Dingledine 2004-02-29 22:04:52 +00:00
parent 247fe31af2
commit 2ac37c64f2

View File

@ -103,7 +103,7 @@ static char *connection_edge_end_reason(char *payload, uint16_t length) {
log_fn(LOG_WARN,"End cell arrived with length 0. Should be at least 1.");
return "MALFORMED";
}
if(*payload < END_STREAM_REASON_MISC || *payload > END_STREAM_REASON_DONE) {
if(*payload < _MIN_END_STREAM_REASON || *payload > _MAX_END_STREAM_REASON) {
log_fn(LOG_WARN,"Reason for ending (%d) not recognized.",*payload);
return "MALFORMED";
}