From e77024f0cf74a791eb2a0a18edaba17f969ae7f9 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 21 May 2008 00:30:51 -0300 Subject: [PATCH] --- yaml --- r: 97740 b: refs/heads/master c: 3e085629bc921c37c1bb2e2fb6227fa14de14682 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/dvb/ttpci/av7110.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 7e27a4537409..3a850a9cd189 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a230e55d92347e09d9ba2e97096df114b2dfaf2d +refs/heads/master: 3e085629bc921c37c1bb2e2fb6227fa14de14682 diff --git a/trunk/drivers/media/dvb/ttpci/av7110.c b/trunk/drivers/media/dvb/ttpci/av7110.c index 747e7f1a6267..f05d43d8b5cf 100644 --- a/trunk/drivers/media/dvb/ttpci/av7110.c +++ b/trunk/drivers/media/dvb/ttpci/av7110.c @@ -51,6 +51,7 @@ #include #include #include +#include #include @@ -1461,9 +1462,9 @@ static int check_firmware(struct av7110* av7110) ptr += 4; /* check dpram file */ - crc = ntohl(*(u32*) ptr); + crc = get_unaligned_be32(ptr); ptr += 4; - len = ntohl(*(u32*) ptr); + len = get_unaligned_be32(ptr); ptr += 4; if (len >= 512) { printk("dvb-ttpci: dpram file is way too big.\n"); @@ -1478,9 +1479,9 @@ static int check_firmware(struct av7110* av7110) ptr += len; /* check root file */ - crc = ntohl(*(u32*) ptr); + crc = get_unaligned_be32(ptr); ptr += 4; - len = ntohl(*(u32*) ptr); + len = get_unaligned_be32(ptr); ptr += 4; if (len <= 200000 || len >= 300000 ||