summaryrefslogtreecommitdiffstats
path: root/src/file_mxf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-06-22 19:44:20 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2016-06-22 19:44:20 +0200
commitb67219e75cb978f4f0faa7b0395be5e77b3132cd (patch)
tree2a80938fa7fba255531fac2eeb7bb4ae0efbcc2e /src/file_mxf.c
parent6e45e14d17a463b9c27d4cf922957cbd4d37e196 (diff)
Fix a few warnings
Diffstat (limited to 'src/file_mxf.c')
-rw-r--r--src/file_mxf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/file_mxf.c b/src/file_mxf.c
index 8d2a588..a206114 100644
--- a/src/file_mxf.c
+++ b/src/file_mxf.c
@@ -89,7 +89,10 @@ static data_check_t data_check_mxf(const unsigned char *buffer, const unsigned i
file_recovery->calculated_file_size+=0x14+(buffer[i+0x11]<<16)+(buffer[i+0x12]<<8)+buffer[i+0x13];
break;
case 0x84:
- file_recovery->calculated_file_size+=0x14+(buffer[i+0x11]<<24)+(buffer[i+0x12]<<16)+(buffer[i+0x13]<<8)+buffer[i+0x14];
+ {
+ const uint32_t *p32=(const uint32_t*)&buffer[i+0x11];
+ file_recovery->calculated_file_size+=0x14 + le32(*p32);
+ }
break;
default:
file_recovery->calculated_file_size+=0x14+buffer[i+0x10];