myhtml icon indicating copy to clipboard operation
myhtml copied to clipboard

redundant check against null

Open QiAnXinCodeSafe opened this issue 7 years ago • 1 comments

Hi all, There is a redundant check against null issue found by Qihoo360 CodeSafe Team. Details as bellow:

https://github.com/lexborisov/myhtml/blob/097039f1c71c9f34bb9177c378cb00fe69ecafa1/source/mycore/mystring.c#L78 if str_raw is a null pointer, function will return.

and https://github.com/lexborisov/myhtml/blob/097039f1c71c9f34bb9177c378cb00fe69ecafa1/source/mycore/mystring.c#L81 the pointer str_raw is dereferenced.

https://github.com/lexborisov/myhtml/blob/097039f1c71c9f34bb9177c378cb00fe69ecafa1/source/mycore/mystring.c#L86 there is no need to check pointer str_raw here.

Cheers Qihoo360 CodeSafe Team

QiAnXinCodeSafe avatar Sep 28 '18 10:09 QiAnXinCodeSafe

@360CodeSafe

Thank you! It will be fixed soon.

lexborisov avatar Sep 28 '18 10:09 lexborisov