aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/pcbit/capi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/pcbit/capi.c')
-rw-r--r--drivers/isdn/pcbit/capi.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/isdn/pcbit/capi.c b/drivers/isdn/pcbit/capi.c
index 47c59e95898d..7b55e151f1b0 100644
--- a/drivers/isdn/pcbit/capi.c
+++ b/drivers/isdn/pcbit/capi.c
@@ -429,8 +429,9 @@ int capi_decode_conn_ind(struct pcbit_chan * chan,
429 if (!(info->data.setup.CallingPN = kmalloc(len - count + 1, GFP_ATOMIC))) 429 if (!(info->data.setup.CallingPN = kmalloc(len - count + 1, GFP_ATOMIC)))
430 return -1; 430 return -1;
431 431
432 memcpy(info->data.setup.CallingPN, skb->data + count + 1, 432 skb_copy_from_linear_data_offset(skb, count + 1,
433 len - count); 433 info->data.setup.CallingPN,
434 len - count);
434 info->data.setup.CallingPN[len - count] = 0; 435 info->data.setup.CallingPN[len - count] = 0;
435 436
436 } 437 }
@@ -457,8 +458,9 @@ int capi_decode_conn_ind(struct pcbit_chan * chan,
457 if (!(info->data.setup.CalledPN = kmalloc(len - count + 1, GFP_ATOMIC))) 458 if (!(info->data.setup.CalledPN = kmalloc(len - count + 1, GFP_ATOMIC)))
458 return -1; 459 return -1;
459 460
460 memcpy(info->data.setup.CalledPN, skb->data + count + 1, 461 skb_copy_from_linear_data_offset(skb, count + 1,
461 len - count); 462 info->data.setup.CalledPN,
463 len - count);
462 info->data.setup.CalledPN[len - count] = 0; 464 info->data.setup.CalledPN[len - count] = 0;
463 465
464 } 466 }
@@ -539,7 +541,7 @@ int capi_decode_conn_actv_ind(struct pcbit_chan * chan, struct sk_buff *skb)
539 541
540#ifdef DEBUG 542#ifdef DEBUG
541 if (len > 1 && len < 31) { 543 if (len > 1 && len < 31) {
542 memcpy(str, skb->data + 2, len - 1); 544 skb_copy_from_linear_data_offset(skb, 2, str, len - 1);
543 str[len] = 0; 545 str[len] = 0;
544 printk(KERN_DEBUG "Connected Party Number: %s\n", str); 546 printk(KERN_DEBUG "Connected Party Number: %s\n", str);
545 } 547 }