We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There is a small bug in server.c:173
void ftp_mkd(Command *cmd, State *state) { char res[2*BSIZE+32]; ... state->message = res; ... state->message = "550 Failed to create directory. Check path or permissions.\r\n"; // local address ... write_state(state); } void write_state(State *state) { write(state->connection, state->message, strlen(state->message)); // bug location: read previous local address }
ASAN
Reproduce
USER anonymous PASS anonymous MKD <filename> // filename should not be existed.
The text was updated successfully, but these errors were encountered:
This type of bug which can lead to undefined behaviors, but it may not cause serious impact at this project.
Sorry, something went wrong.
Another bug is in server.c:51, it is because state does not initialize username after allocating memory space.
State *state = malloc(sizeof(State)); ... printf("User %s sent command: %s\r\n",(state->username==0)?"unknown":state->username,buffer); // line 51
ASAN:
how you find the bug? can you share?
No branches or pull requests
There is a small bug in server.c:173
ASAN
![image](https://private-user-images.githubusercontent.com/44093631/261827812-62e7f3dc-22e6-4dd8-81d4-98f91918b0ed.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNDExNDgsIm5iZiI6MTczOTI0MDg0OCwicGF0aCI6Ii80NDA5MzYzMS8yNjE4Mjc4MTItNjJlN2YzZGMtMjJlNi00ZGQ4LTgxZDQtOThmOTE5MThiMGVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDAyMjcyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgxM2MzNmQ0ODc5NTdkY2UzY2VjOTE5ZjgxODA2NTMyNTk3MTMzMDNkOTcwZWIwY2JkYmZmZTYzYTkwZDY1NTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZcXHilX92nRqq8NDmAzdJFMDaXZ7jmjjpZQLJFkpy2I)
Reproduce
The text was updated successfully, but these errors were encountered: