Menu

#1 Check return codes everywhere

open-accepted
None
5
2005-09-01
2005-07-25
No

Some checks for return codes are missing.

Example:
Please add more error handling for null pointers from
"malloc" in the function "push_team".
http://cvs.sourceforge.net/viewcvs.py/openinfreno/stable/src/agent/agent.c?rev=1.5&view=markup

Discussion

  • Dennis W. Mattison

    Logged In: YES
    user_id=642285

    We are working on this as part of our release for Toorcon 2005.

     
  • Dennis W. Mattison

    • assigned_to: nobody --> ltlw0lf
     
  • Dennis W. Mattison

    Logged In: YES
    user_id=642285

    Mallocs have been fixed in /devel, and I'll be moving it to
    /unstable pretty soon. It isn't really a bug (it certainly
    won't prevent the normal operation of the software,) but it
    is very bad programming.

    I was more worried about getting the code working and
    running then cleaning it up. Thanks for keeping me honest.

    There will probably be more.

     
  • Dennis W. Mattison

    • status: open --> closed
     
  • Markus Elfring

    Markus Elfring - 2005-09-01

    Logged In: YES
    user_id=572001

    I suggest to keep this report open until all places in the
    stable sources will be fixed.
    The stuff will really become a bug if you will notice a
    segmentation fault.

    Would you like to improve the code with the help of the tool
    "http://splint.org/"?

     
  • Markus Elfring

    Markus Elfring - 2005-09-01
    • status: closed --> open-accepted
     
  • Dennis W. Mattison

    Logged In: YES
    user_id=642285

    Splint does a wonderful job of telling me what is wrong with
    the headers supplied with the operating system, but I have
    yet to find the magic flag for it to tell me what is wrong
    with my code.

    It parse errors in pcap-buf.h.... (this is even with +posixlib.)

    It looks like a worthwhile tool, but it will take some time
    to understand how it works and what secret handshake is
    required to get it to do what it needs to do.

     

Log in to post a comment.

MongoDB Logo MongoDB