Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre Release (v3.8.0-beta.6): v3.8.0-beta.5 で追加された不適切なバリデーションの除去 #513

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Drivers/Super/driver_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,9 @@ static DS_ERR_CODE DS_validate_stream_config_(const DriverSuper* p_super, DS_Str

if (p->settings.rx_buffer_ == NULL) return DS_ERR_CODE_ERR;
if (p->settings.rx_buffer_->buffer == NULL) return DS_ERR_CODE_ERR;
if (p->settings.rx_buffer_->capacity < p_super->config.settings.rx_buffer_size_in_if_rx_) return DS_ERR_CODE_ERR;
// ↓ rx_buffer_size_in_if_rx_ が初期値の場合,大抵の場合ここで ERR となってしまう.
// rx_buffer_size_in_if_rx_ は通信中のビット反転で len の情報がおかしくなったときなど用なので, capacity との比較は一旦なしに
// if (p->settings.rx_buffer_->capacity < p_super->config.settings.rx_buffer_size_in_if_rx_) return DS_ERR_CODE_ERR;
if (p->settings.rx_buffer_->capacity < p->settings.rx_frame_size_) return DS_ERR_CODE_ERR;
if (p->settings.rx_buffer_->capacity < p->settings.rx_header_size_ + p->settings.rx_footer_size_) return DS_ERR_CODE_ERR;

Expand Down