瀏覽代碼

gigaset: fix format string typo in CAPI dial command

A missing dot lead to garbage characters being included in the
dial command generated from a CAPI CONNECT_REQ message, which
interestingly enough worked anyway, illustrating the resilience
of the device.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tilman Schmidt 16 年之前
父節點
當前提交
22077ebceb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/isdn/gigaset/capi.c

+ 1 - 1
drivers/isdn/gigaset/capi.c

@@ -1254,7 +1254,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
 	commands[AT_DIAL] = kmalloc(l+3, GFP_KERNEL);
 	commands[AT_DIAL] = kmalloc(l+3, GFP_KERNEL);
 	if (!commands[AT_DIAL])
 	if (!commands[AT_DIAL])
 		goto oom;
 		goto oom;
-	snprintf(commands[AT_DIAL], l+3, "D%*s\r", l, pp);
+	snprintf(commands[AT_DIAL], l+3, "D%.*s\r", l, pp);
 
 
 	/* encode parameter: Calling party number */
 	/* encode parameter: Calling party number */
 	pp = cmsg->CallingPartyNumber;
 	pp = cmsg->CallingPartyNumber;