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

解决一个if语句的逻辑错误和一个段错误 #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

myk12
Copy link

@myk12 myk12 commented Oct 8, 2023

#25

IF语句逻辑错误

simple_quic_server在判断命令行参数是否为空的if语句中,错误地添加!导致逻辑错误。

段错误

当simple_quic_server的命令行参数中的文件名为相对路径时,fopen函数调用失败,导致ProofSource初始化失败,进一步导致段错误。

In the 'if' statement for checking whether the command-line
arguments are empty, an extra '!' was added, leading to a logic error.
When the filename in the command-line arguments of simple_quic_server is a relative path,
the fopen system call fails, leading to the failure of ProofSource initialization and
subsequently causing a segmentation fault due to a null pointer reference.

Resolve: The FilePath class adds a method to check whether the file name is an absolute path.
Simple_quic_server checks if the file is an absolute path when opening the file
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

Successfully merging this pull request may close these issues.

1 participant