Menu

#3 segsegv due lack of NULL-termination opt.files

closed-duplicate
nobody
None
5
2011-09-15
2011-08-19
Anonymous
No

rhash-1.2.7 dies on sigsegv (depending on previous memory content and malloc implementation) due lack of explicit NULL-termination of opt.files array.
BTW, for whatever reason (it checks only output and not $?) test/test_rhash fails to catch this.

Discussion

  • Nobody/Anonymous

     
  • Aleksey

    Aleksey - 2011-08-20

    Thanks for catching, but this bug is duplicate of
    #3391587 Segmentation fault running tests
    https://sourceforge.net/tracker/?func=detail&aid=3391587&group_id=205103&atid=992288

    The attached patch is alternative (but simple) solution to patch from #3391587. Looks like the code is correct, without a buffer overflow.

    A agree that $? should be checked, But RHash returns different ExitCodes, not sure if it can be separated from a program crash.

     
  • Aleksey

    Aleksey - 2011-08-20
    • status: open --> open-duplicate
     
  • Aleksey

    Aleksey - 2011-09-15

    the bug was fixed in v1.2.8

     
  • Aleksey

    Aleksey - 2011-09-15
    • status: open-duplicate --> closed-duplicate
     

Log in to post a comment.