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

do_job() return value assigned to an unsigned int #15

Closed
tnorth opened this issue Mar 7, 2013 · 2 comments
Closed

do_job() return value assigned to an unsigned int #15

tnorth opened this issue Mar 7, 2013 · 2 comments

Comments

@tnorth
Copy link
Contributor

tnorth commented Mar 7, 2013

If the allocation of temporaries fails, do_job() returns -1. But on line 713 and line 734 :

ntbytes = do_job();
if (ntbytes < 0) {
   return -1;
}

Where ntbytes is uint32_t, line 623. The result will be cast to an unsigned it, and the failure will never be catched. (right ?)

@esc
Copy link
Member

esc commented Mar 9, 2013

Is there any way to provoke this? For example by getting do_job() to return -1 on 25% of it's invocations?

@FrancescAlted
Copy link
Member

That's right. That's a bug and must be fixed.

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

3 participants