Menu

#72 Pointer access bug in src/dep/daemonconfig.c.

v1.0_(example)
open
nobody
None
5
2015-11-20
2015-11-19
No

The latest version in trunk segfaults when called with long help like:
$ ptpd2 -H
I didn't fully understand the purpose of the following assignment but they caused the segfaults:
helpKey[0] = '\0';

I just removed all of these assignments, see atttached patch.

By the way, I saw that you even have a repository at github, that's awesome, but I would be very happy if you guys could also keep the repository at github up-to-date, then I don't have to manually convert all SVN commits to github. Thanks!

1 Attachments

Discussion

  • Wojciech Owczarek

    Hi Philipp,

    Thanks - this has already been identified and fixed, but the code has not been committed yet.

    After the next few commits, we are migrating completely to github.

    Regards,
    Wojciech

     
  • Wojciech Owczarek

    By the way - the assignment is a crude way to tell the caller function (printSettingHelp) that we have found the setting we were looking for and printed help output. This is ugly, I admit. This will probably be reworked in favour of something more sane.

    Regards,
    Wojciech

     
  • Philipp Lutz

    Philipp Lutz - 2015-11-20

    Hi Wojciech,

    I already imagined this kind of functionality, but still wasn't sure wether this line of code was done on purpose or some left-over after the previous refactoring ;)

    Thumbs up regarding the github migration ;)

    Cheers
    Phil

     

    Last edit: Philipp Lutz 2015-11-20

Log in to post a comment.