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

[protobuf-codegen] Missing panic condition #683

Open
HeeillWang opened this issue Sep 25, 2023 · 0 comments
Open

[protobuf-codegen] Missing panic condition #683

HeeillWang opened this issue Sep 25, 2023 · 0 comments

Comments

@HeeillWang
Copy link

I executed fuzzing, and faces many intentional crashes such like assert statement. Most crashes does not documented with # Panic section, so I'll list up those. Since most of them are quite obvious, here I omits detailed reproduce step. Every cases are triggered from public APIs of protobuf-codegen-3.2.0

Case-1

Thread '<unnamed>' panicked at 'assertion failed: !s.is_empty()', protobuf-codegen-3.2.0/src/gen/rust/ident.rs:13

Triggered from proto_name_to_rs()

Case-2

Thread '<unnamed>' panicked at 'OUT_DIR env var not set: NotPresent', protobuf-codegen-3.2.0/src/codegen/mod.rs:119

Triggered from Codegen::cargo_out_dir()

Case-3

Thread '<unnamed>' panicked at 'root dir in components of rel path: `/`',protobuf-codegen-3.2.0/src/codegen/mod.rs:109

Triggered from Codegen::cargo_out_dir()

Case-4

Thread '<unnamed>' panicked at 'empty rel path: ``', protobuf-codegen-3.2.0/src/codegen/mod.rs:116

Triggered from Codegen::cargo_out_dir()

Case-5

Thread '<unnamed>' panicked at 'parent path in components of rel path: `..`',protobuf-codegen-3.2.0/src/codegen/mod.rs:102

Triggered from Codegen::cargo_out_dir()

Expected patch

  • Explicitly mention panic condition on docs with # Panic section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant