| |

VerySource

 Forgot password?
 Register
Search
Author: wu13579

Is it safe

[Copy link]

0

Threads

36

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-1-22 15:36:01
| Show all posts
for (i = MinIndex + 1; i <= MaxIndex; i ++)
{
if (conditions met)
{
return false;
}
} return true;

Such a call is safe.You should find all the ways for the execution of the program in the program, and you must return safely at the end of each way, but you do not have an exception in the if statement, that is, skip the program execution If it does, it will eventually be able to find the return statement.
Reply

Use magic Report

0

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 Invalid IP Address

Post time: 2020-1-25 15:45:01
| Show all posts
Program logic must be clarified, manual management of resources should be paid attention to, and there are no security risks.
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

Post time: 2020-1-25 21:00:01
| Show all posts
For the moment, nothing is unsafe.
Reply

Use magic Report

1

Threads

13

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-6-30 13:30:01
| Show all posts
There should be no problems.

for (i=MinIndex+1;i<=MaxIndex;i++)
{


assert(i <= MaxIndex); /*If you still worry about insecurity, add this*/
if(i> MaxIndex)
{
printf("i> MaxIndex!");
exit(1);
}



if (conditions are met)
{
return false;
}
}return true;
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-7-26 13:15:01
| Show all posts
Learn
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list