]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a bogus third argument to ast_copy_string().
authorRussell Bryant <russell@russellbryant.com>
Thu, 28 Jan 2010 15:03:17 +0000 (15:03 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 28 Jan 2010 15:03:17 +0000 (15:03 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@243779 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 6597ba88246c31420e18680bf30fb0e1db9118bb..82516a21c14038c8bd76ba5f580822afd58e2b0d 100644 (file)
@@ -12706,10 +12706,11 @@ static int function_sipchaninfo_read(struct ast_channel *chan, char *cmd, char *
        } else  if (!strcasecmp(data, "peername")) {
                ast_copy_string(buf, p->peername, len);
        } else if (!strcasecmp(data, "t38passthrough")) {
-               if (p->t38.state == T38_DISABLED)
-                       ast_copy_string(buf, "0", sizeof("0"));
-               else    /* T38 is offered or enabled in this call */
-                       ast_copy_string(buf, "1", sizeof("1"));
+               if (p->t38.state == T38_DISABLED) {
+                       ast_copy_string(buf, "0", len);
+               } else { /* T38 is offered or enabled in this call */
+                       ast_copy_string(buf, "1", len);
+               }
        } else {
                ast_channel_unlock(chan);
                return -1;