#82 broken code in commandconf.c:87

closed-fixed
nobody
None
5
2010-03-27
2009-12-23
dcb
No

Around line 87 of source code file commandconf.c
is

tmp=(char*)malloc(sizeof(char)
*(strlen(after)+strlen(line)+2));
strcat(tmp,after);

You can't cat onto uninitialised data

Suggest new code

tmp=(char*)malloc(sizeof(char)
*(strlen(after)+strlen(line)+2));
strcpy(tmp,after);

Discussion

  • Richard van den Berg

    Fixed in CVS, thanks.

     
  • Richard van den Berg

    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks