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

imap-append.c example: incorrect pointer check in payload_source() #7774

Closed
achuykov opened this issue Sep 24, 2021 · 1 comment
Closed

imap-append.c example: incorrect pointer check in payload_source() #7774

achuykov opened this issue Sep 24, 2021 · 1 comment

Comments

@achuykov
Copy link

@achuykov achuykov commented Sep 24, 2021

Hi,

This condition is always true because even incorrect offset produces valid (non-NULL) pointer:
data = &payload_text[upload_ctx->bytes_read];
if(data) {

I expect that "if" condition should check the end end of ASCIIZ string:
if(*data) {

Thanks,
Alexander

@bagder
Copy link
Member

@bagder bagder commented Sep 24, 2021

Yes, makes perfect sense!

bagder added a commit that referenced this issue Sep 24, 2021
Reported-by: Alexander Chuykov
Fixes #7774
@bagder bagder closed this in 5c4e46c Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants