| |

VerySource

 Forgot password?
 Register
Search
View: 673|Reply: 2

C / c ++ / VC invited

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Invalid IP Address

Post time: 2020-1-23 13:00:02
| Show all posts |Read mode
sTrimedOrg is CString type

const unsigned char * p = (const unsigned char *) (sTrimedOrg.operator const char * ());


Could p be null?
Will there be an uninitialized memory access error for p access later?
Reply

Use magic Report

0

Threads

25

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-2-6 15:00:01
| Show all posts
It shouldn't.
Reply

Use magic Report

0

Threads

70

Posts

42.00

Credits

Newbie

Rank: 1

Credits
42.00

 China

Post time: 2020-2-8 07:45:01
| Show all posts
Could p be null?
Will there be an uninitialized memory access error for p access later?

p will not be null, and access to p will not result in uninitialized memory access errors,
Unless there is a problem with sTrimedOrg.
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