Merge branch 'drop-time' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek...
[pandora-kernel.git] / drivers / nfc / pn533.c
index 2daf04c..cf1a87b 100644 (file)
@@ -13,9 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include <linux/device.h>
@@ -523,6 +521,9 @@ static bool pn533_acr122_is_rx_frame_valid(void *_frame, struct pn533 *dev)
        if (frame->ccid.type != 0x83)
                return false;
 
+       if (!frame->ccid.datalen)
+               return false;
+
        if (frame->data[frame->ccid.datalen - 2] == 0x63)
                return false;