summaryrefslogtreecommitdiffstats
path: root/src/file_riff.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-06-01 18:06:35 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-06-01 18:06:35 +0200
commit65dbe3d4baf4d486bb8119ec197a20697ba4ca28 (patch)
tree1ed5c06affe799b8c4d8efd188a5b4197c6b9dcf /src/file_riff.c
parent8ab840414394e1e8454413485c578d75fd8ab68f (diff)
constify more variables
Diffstat (limited to 'src/file_riff.c')
-rw-r--r--src/file_riff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file_riff.c b/src/file_riff.c
index 11bdb04..77b811c 100644
--- a/src/file_riff.c
+++ b/src/file_riff.c
@@ -176,7 +176,7 @@ static int data_check_avi(const unsigned char *buffer, const unsigned int buffer
while(file_recovery->calculated_file_size + buffer_size/2 >= file_recovery->file_size &&
file_recovery->calculated_file_size + 12 < file_recovery->file_size + buffer_size/2)
{
- unsigned int i=file_recovery->calculated_file_size - file_recovery->file_size + buffer_size/2;
+ const unsigned int i=file_recovery->calculated_file_size - file_recovery->file_size + buffer_size/2;
const riff_chunk_header *chunk_header=(const riff_chunk_header*)&buffer[i];
if(memcmp(&buffer[i], "RIFF", 4)==0 && memcmp(&buffer[i+8], "AVIX", 4)==0)
file_recovery->calculated_file_size += 8 + le32(chunk_header->dwSize);
@@ -191,7 +191,7 @@ int data_check_avi_stream(const unsigned char *buffer, const unsigned int buffer
while(file_recovery->calculated_file_size + buffer_size/2 >= file_recovery->file_size &&
file_recovery->calculated_file_size + 8 < file_recovery->file_size + buffer_size/2)
{
- unsigned int i=file_recovery->calculated_file_size - file_recovery->file_size + buffer_size/2;
+ const unsigned int i=file_recovery->calculated_file_size - file_recovery->file_size + buffer_size/2;
const riff_chunk_header *chunk_header=(const riff_chunk_header*)&buffer[i];
if(buffer[i+2]!='d' || buffer[i+3]!='b') /* Video Data Binary ?*/
return 2;