X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=crypto%2Fpcompress.c;h=7140fe70c7af04b2f544839b734de9aa5c461533;hb=bc7562355fda8075793bf66094cda573206ec693;hp=04e083ff5373528ae4cb19263cb340461827df16;hpb=d865983292cf1e526de8aba31870794909860d5b;p=firefly-linux-kernel-4.4.55.git diff --git a/crypto/pcompress.c b/crypto/pcompress.c index 04e083ff5373..7140fe70c7af 100644 --- a/crypto/pcompress.c +++ b/crypto/pcompress.c @@ -53,8 +53,7 @@ static int crypto_pcomp_report(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rpcomp; - snprintf(rpcomp.type, CRYPTO_MAX_ALG_NAME, "%s", "pcomp"); - + strncpy(rpcomp.type, "pcomp", sizeof(rpcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp), &rpcomp)) goto nla_put_failure;