Menu

#2 fixes callingcard.conf parsing bug 1024900

open
nobody
None
5
2004-09-23
2004-09-23
Anonymous
No

use strcpy in stead of strncpy for copying config
variables from tmp pointer from asterisk

Discussion

  • Nobody/Anonymous

    app_callingcard.c patch

     
  • Iftikhar Rathore

    Logged In: YES
    user_id=7500

    This patch should work, but I dont understand, why use
    malloc if you are assuming alocated memory is set to 0
    (malloc doesn't do that, calloc does), you should use
    calloc. So besides the fix proposed by this patch, there is
    another way to do it, it is to use calloc instead of malloc,
    all you have to do is replace every occurence

    malloc(
    with:
    calloc( 1,

    And the assumption made (allocated memory is set to zero)
    would be correct.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.