Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

[util.c:85]: possible array index out of range ? #49

Closed
dcb314 opened this issue Dec 12, 2014 · 6 comments
Closed

[util.c:85]: possible array index out of range ? #49

dcb314 opened this issue Dec 12, 2014 · 6 comments

Comments

@dcb314
Copy link

dcb314 commented Dec 12, 2014

[util.c:85]: (style) Array index 'i' is used before limits check.

Source code is

while(string[i] != '\0' && i < n) {

Suggest sanity check array index before use.

@TierraDelFuego
Copy link

Function that is in, strcmp_n, is not used according to cppcheck

@dcb314
Copy link
Author

dcb314 commented Jan 25, 2015

Feel free to delete the code, then.

@TierraDelFuego
Copy link

What you'll need to do is fork this project and then delete the code then tag your code then send a pull request to the maintainer of this repo

@dcb314
Copy link
Author

dcb314 commented Jan 28, 2015

What you'll need to do ...

I just find problems. Folks more familiar with the code fix them.

@jech
Copy link
Owner

jech commented Feb 13, 2015

You can also send a patch to the list.

@jech
Copy link
Owner

jech commented May 16, 2015

Fixed in fa1e2fa. Thanks.

@jech jech closed this as completed May 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants