Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C
void custom_func(char *param1, int param2, double param3)
{
	char local[30];
	strcpy(local, param1);
}

int main(int argc, char** argv)
{
	custom_func(argv[1], 0, 30.30);
}


What I have tried:

am trying to find a vulnerability !! and how many vulnerability is in a program... !! so please anybody have any idea.. please help me !!
Posted
Updated 25-Feb-18 23:27pm
v2
Comments
Suvendu Shekhar Giri 26-Feb-18 3:11am    
No homework, please!
If you are trying to understand any particular concept/code we may help.

1 solution

We aren't going to do your homework for you - it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think!

But I'll give you a hint: what happens if I run it from the command line like this:
myApp "Call me Ishmael. Some years ago- never mind how long precisely- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world."

What effects might that have?
 
Share this answer
 
Comments
Richard MacCutchan 26-Feb-18 4:33am    
What effects might that have?It reminds me that I need to go back and re-read the book.
OriginalGriff 26-Feb-18 4:46am    
Get up to date and just watch the movie! :laugh:

Or really up to date, and have the movie on while facebooking, or texting... :sigh:
CodeWraith 26-Feb-18 7:46am    
Saw a good modern interpretation just last week. With submarines and nuke torpedos. In the end they nuke an island instead, the captain resorts to try the traditional way with a harpoon and the submarine is sunk by MD.
CPallini 26-Feb-18 5:26am    
:-)
5.
CPallini 26-Feb-18 5:27am    
Another run could be just
myApp

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900