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

Completion of error handling #150

Closed
elfring opened this Issue Mar 6, 2015 · 8 comments

Comments

Projects
None yet
3 participants
@elfring
Contributor

elfring commented Mar 6, 2015

I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing.

Would you like to add more error handling for return values from functions like the following?

bagder added a commit that referenced this issue Mar 6, 2015

metalink: add some error checks
malloc() and strdup() calls without checking return codes.

Reported-by: Markus Elfring
Bug: #150

@bagder bagder self-assigned this Mar 6, 2015

@bagder

This comment has been minimized.

Member

bagder commented Mar 6, 2015

vms_realwfilesize() doesn't have any fseek calls. I assume you mean the ones in operate_do(). I consider them mostly harmless. The same goes for the parse_cert_parameter strdups.

The metalink function was improved slightly in commit 3ac3331.

@elfring

This comment has been minimized.

Contributor

elfring commented Mar 6, 2015

I suggest to avoid ignorance of return values a bit more.

Are you interested to apply aspect-oriented software development?
How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?

@bagder

This comment has been minimized.

Member

bagder commented Mar 6, 2015

Can you identify any actual problems or bugs due to your discoveries? Can you submit a patch with your suggested fixes?

@elfring

This comment has been minimized.

Contributor

elfring commented Mar 6, 2015

How do you think about to improve static source code analysis also for your software?

Do you find information sources like the following useful?

@bagder

This comment has been minimized.

Member

bagder commented Mar 6, 2015

Does that mean you can't identify a problem or provide a patch?

@evert

This comment has been minimized.

evert commented Mar 6, 2015

No, he wants to have a long-winded argument about software architecture!

@elfring

This comment has been minimized.

Contributor

elfring commented Mar 6, 2015

The suggested tools can help to transform source code in various ways.
Which transformations are acceptable for you to be performed by another software tool automatically?

@bagder

This comment has been minimized.

Member

bagder commented Mar 6, 2015

No bug then. Closed.

@bagder bagder closed this Mar 6, 2015

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.