Menu

#447 Fix dereference NULL and Buffer not NULL terminated issues in lame_main.c

Quality
closed-accepted
None
5
2017-08-08
2015-05-19
Surabhi
No

Hello,
I found following issues in file lame_main.c

1)Buffer not null terminated (BUFFER_SIZE_WARNING)
Calling strncpy on destination array nogapdir might leave the destination string unterminated.
620 strncpy(nogapdir, outPath, PATH_MAX + 1);

2)Dereference null return value (NULL_RETURNS)

Assigning: outf = null return value from init_files.
677 outf = init_files(gf, nogap_inPath[i], outPath);

3)line 653 fclose(outf); should be done before returning error

4)FIXME: replace strcpy by safer strncpy

The above fixes have been done in the patch attached.
Please check.

1 Attachments

Discussion

  • Robert Hegemann

    Robert Hegemann - 2017-08-08
    • status: open --> closed-accepted
    • assigned_to: Robert Hegemann
     
  • Robert Hegemann

    Robert Hegemann - 2017-08-08

    Thank you!

     

Log in to post a comment.