From 20094fca34cef73f93449f694210dd94dfe2e0e2 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 4 Jul 2012 22:27:18 +0000 Subject: [PATCH] --- yaml --- r: 315051 b: refs/heads/master c: 5c9df5fed198ad8b967f33a1e11862f2a1d08bf7 h: refs/heads/master i: 315049: e5f6d51a2640820ce005db2ef4b1130695b807bd 315047: 055f32fcffc70151040cc02835aa20b980dc901e v: v3 --- [refs] | 2 +- trunk/net/ax25/ax25_addr.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 22288e68b6fd..365bfcd08747 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e8efcec5394cbf7ae67ccb137cb1a45ae3e6f6c8 +refs/heads/master: 5c9df5fed198ad8b967f33a1e11862f2a1d08bf7 diff --git a/trunk/net/ax25/ax25_addr.c b/trunk/net/ax25/ax25_addr.c index 9162409559cf..e7c9b0ea17a1 100644 --- a/trunk/net/ax25/ax25_addr.c +++ b/trunk/net/ax25/ax25_addr.c @@ -189,8 +189,10 @@ const unsigned char *ax25_addr_parse(const unsigned char *buf, int len, digi->ndigi = 0; while (!(buf[-1] & AX25_EBIT)) { - if (d >= AX25_MAX_DIGIS) return NULL; /* Max of 6 digis */ - if (len < 7) return NULL; /* Short packet */ + if (d >= AX25_MAX_DIGIS) + return NULL; + if (len < AX25_ADDR_LEN) + return NULL; memcpy(&digi->calls[d], buf, AX25_ADDR_LEN); digi->ndigi = d + 1;