Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368733
b: refs/heads/master
c: 5a048e3
h: refs/heads/master
i:
  368731: cda65ce
v: v3
  • Loading branch information
Andy Shevchenko authored and David S. Miller committed Mar 27, 2013
1 parent a7aaedd commit 0f246bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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: 05fcaeac05c56ebe5a336fe617c0a0db4dc7ae3b
refs/heads/master: 5a048e3b59fb4211b7978f78217878071c344379
5 changes: 2 additions & 3 deletions trunk/net/core/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/ctype.h>
#include <linux/inet.h>
#include <linux/mm.h>
#include <linux/net.h>
Expand Down Expand Up @@ -348,9 +349,7 @@ int mac_pton(const char *s, u8 *mac)

/* Don't dirty result unless string is valid MAC. */
for (i = 0; i < ETH_ALEN; i++) {
if (!strchr("0123456789abcdefABCDEF", s[i * 3]))
return 0;
if (!strchr("0123456789abcdefABCDEF", s[i * 3 + 1]))
if (!isxdigit(s[i * 3]) || !isxdigit(s[i * 3 + 1]))
return 0;
if (i != ETH_ALEN - 1 && s[i * 3 + 2] != ':')
return 0;
Expand Down

0 comments on commit 0f246bb

Please sign in to comment.