bugGNU recutils - Bugs: bug #30621, The code is not checking the...

 
 

bug #30621: The code is not checking the return values of all system calls

Submitter:  Jose E. Marchesi <jemarch>
Submitted:  Sun 01 Aug 2010 08:10:04 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  jemarch Open/Closed:  Open
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Jump to the original submission

Wed 07 Mar 2012 02:20:53 PM UTC, comment #6: 

I suggest to avoid unchecked function calls.
Would you like to add more error handling for return values from "printf" like in the function "rec_sex_ast_print_node" and from "strdup" in the function "rec_write_comment"?

http://git.savann ... 77c6e953204e#n249
http://git.savann ... 5385d69e3104#n114

Markus Elfring <elfring>
Sat 06 Nov 2010 10:50:44 AM UTC, comment #5: 

Inserted in TODO.

Jose E. Marchesi <jemarch>
Group administrator
Mon 23 Aug 2010 03:59:04 PM UTC, comment #4: 

The code of the utilities are now using xmalloc and xstrdup.

Jose E. Marchesi <jemarch>
Group administrator
Thu 05 Aug 2010 07:04:54 PM UTC, comment #3: 

Hi Karl.

That looks like a good idea.  I just imported the module
and used it, and created some useful common routines in
utils/recutl.c.

Thanks!


Jose E. Marchesi <jemarch>
Group administrator
Mon 02 Aug 2010 09:29:04 PM UTC, comment #2: 

also, you should use the closeout gnulib module so that commands like recwhatever >/dev/full exit appropriately.  See GNU hello for an example if you need it :).

Karl Berry <karl>
Mon 02 Aug 2010 07:49:06 PM UTC, comment #1: 

The 'malloc' cases are done, but it would be better to
use the gnulib xmalloc module in the utilities.


Jose E. Marchesi <jemarch>
Group administrator
Sun 01 Aug 2010 08:10:04 PM UTC, original submission:  

There are some unchecked malloc() calls in both the library
and the utilities.  Any system call shall have its return
value checked.


Jose E. Marchesi <jemarch>
Group administrator

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by elfring (Posted a comment)
  • -email is unavailable- added by karl (Posted a comment)
  • -email is unavailable- added by jemarch (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-02 jemarch Assigned toNone jemarch

    Back to the top

    Powered by Savane 3.16-2753.
    Corresponding source code