Menu

#294 parsing args via '-f' counts merge_in_num incorrectly

0.7.x
closed
5
2012-09-15
2009-12-11
No

version: covered-20091126
file: merge.c

Function 'merge_parse_args'' is recursively called for any '-f <file>'. At the end of function 'merge_parse_args' the global variable 'merge_in_num' is incremented for any entry in global list 'merge_in_head'. This causes that CDD file which are specified via file and '-f' are counted twice and break an assertion later.

You will be able to able reproduce this bug with any merge of CDD files. Just specify the file names via '-f''.

Discussion

  • Jens Wallner

    Jens Wallner - 2009-12-11

    patch: diff -cNB merge.c merge-orig.c > merge-diff.c

     
  • Jens Wallner

    Jens Wallner - 2009-12-11

    The bug is easily to fix. Just place the counting and checking around 'merge_in_num' outside of 'merge_parse_args'. I put a related patch along with the bug description. You are welcome to contact me for any questions ..

     
  • Trevor Williams

    Trevor Williams - 2009-12-12

    Jens,

    I have accepted the patch that you have provided for this bug. The CVS tree has been updated with this bug fix and it will be generally available in the 0.7.8 stable release.

    Thanks,
    Trevor

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.