0

int my_filewrite(char *question) {
char filename[100];
int fd;
printf(question);
scanf("%s", filename);

if (strlen(filename) > 100) }

return 0;

please can you help to find potential vulnerabilities in this code? Thank you.

4
Contributors
7
Replies
42
Views
4 Years
Discussion Span
Last Post by Ezzaral
0

EDIT This looks like a quiz question.

Are you asking for help on a quiz/test/homework?

Edited by Begginnerdev

0

yes, it is for exam. If you can help, it will be great.

0

As per Community Rules we are a help forum.

Therefore, we can not simply answer questions for you.

We can, however, point you to things to help you learn as Moschops has.

Edited by Begginnerdev

0

Mate, I know little about C, my programing is not good. If I had time, I would figure out but now I don't have so much time...so please if you know which line creates vulnerability, please write. I will appreciate a lot.

0

ok keep your knowledge to yourself, I can learn by myself. Later I will not need forums to learn. I will use forum to help people, even it requires to write by line by explanations.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.