Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cppcheck: out of bounds access #59

Closed
win32asm opened this issue Jan 14, 2015 · 2 comments
Closed

cppcheck: out of bounds access #59

win32asm opened this issue Jan 14, 2015 · 2 comments

Comments

@win32asm
Copy link

ARGB has 4 components to save now...

diff --git a/qrenc.c b/qrenc.c
index 78f1c12..796ab01 100644
--- a/qrenc.c
+++ b/qrenc.c
@@ -189,7 +189,7 @@ static int color_set(unsigned char color[4], const char *value)
 {
        int len = strlen(value);
        int i, count;
-       unsigned int col[3];
+       unsigned int col[4];
        if(len == 6) {
                count = sscanf(value, "%02x%02x%02x%n", &col[0], &col[1], &col[2], &len);
                if(count < 3 || len != 6) {
@win32asm
Copy link
Author

relevant pull request: #63

@fukuchi
Copy link
Owner

fukuchi commented May 4, 2015

Thank you for the notification. Now I merged #63 and closed this bug.

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

No branches or pull requests

2 participants