X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fisdn%2Fpcbit%2Fcapi.c;h=ac5a91ccde8102b18a3ae39a7a309e6137f9b978;hb=f43dc23d5ea91fca257be02138a255f02d98e806;hp=bef321d0e51d5a2775ef47fd6ddbcd6b6507bffc;hpb=8678887e7fb43cd6c9be6c9807b05e77848e0920;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/isdn/pcbit/capi.c b/drivers/isdn/pcbit/capi.c index bef321d0e51d..ac5a91ccde81 100644 --- a/drivers/isdn/pcbit/capi.c +++ b/drivers/isdn/pcbit/capi.c @@ -15,9 +15,9 @@ /* * Documentation: - * - "Common ISDN API - Perfil Português - Versão 2.1", + * - "Common ISDN API - Perfil Português - Versão 2.1", * Telecom Portugal, Fev 1992. - * - "Common ISDN API - Especificação de protocolos para + * - "Common ISDN API - Especificação de protocolos para * acesso aos canais B", Inesc, Jan 1994. */ @@ -27,7 +27,6 @@ * encode our number in CallerPN and ConnectedPN */ -#include #include #include @@ -430,8 +429,9 @@ int capi_decode_conn_ind(struct pcbit_chan * chan, if (!(info->data.setup.CallingPN = kmalloc(len - count + 1, GFP_ATOMIC))) return -1; - memcpy(info->data.setup.CallingPN, skb->data + count + 1, - len - count); + skb_copy_from_linear_data_offset(skb, count + 1, + info->data.setup.CallingPN, + len - count); info->data.setup.CallingPN[len - count] = 0; } @@ -458,8 +458,9 @@ int capi_decode_conn_ind(struct pcbit_chan * chan, if (!(info->data.setup.CalledPN = kmalloc(len - count + 1, GFP_ATOMIC))) return -1; - memcpy(info->data.setup.CalledPN, skb->data + count + 1, - len - count); + skb_copy_from_linear_data_offset(skb, count + 1, + info->data.setup.CalledPN, + len - count); info->data.setup.CalledPN[len - count] = 0; } @@ -540,7 +541,7 @@ int capi_decode_conn_actv_ind(struct pcbit_chan * chan, struct sk_buff *skb) #ifdef DEBUG if (len > 1 && len < 31) { - memcpy(str, skb->data + 2, len - 1); + skb_copy_from_linear_data_offset(skb, 2, str, len - 1); str[len] = 0; printk(KERN_DEBUG "Connected Party Number: %s\n", str); }