Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220966
b: refs/heads/master
c: 520efd1
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Juhl authored and John W. Linville committed Oct 29, 2010
1 parent 7a99852 commit ad56899
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 731b2034999bbfe86c9074f1b0d611940bf7c323
refs/heads/master: 520efd1ace3f826120482e57a95d649b4e1c1684
6 changes: 5 additions & 1 deletion trunk/net/mac80211/debugfs_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,13 @@ static ssize_t key_key_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
struct ieee80211_key *key = file->private_data;
int i, res, bufsize = 2 * key->conf.keylen + 2;
int i, bufsize = 2 * key->conf.keylen + 2;
char *buf = kmalloc(bufsize, GFP_KERNEL);
char *p = buf;
ssize_t res;

if (!buf)
return -ENOMEM;

for (i = 0; i < key->conf.keylen; i++)
p += scnprintf(p, bufsize + buf - p, "%02x", key->conf.key[i]);
Expand Down

0 comments on commit ad56899

Please sign in to comment.