summaryrefslogtreecommitdiffstats
path: root/src/file_ogg.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_ogg.c
parent8ab840414394e1e8454413485c578d75fd8ab68f (diff)
constify more variables
Diffstat (limited to 'src/file_ogg.c')
-rw-r--r--src/file_ogg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/file_ogg.c b/src/file_ogg.c
index 8c28042..d2a349e 100644
--- a/src/file_ogg.c
+++ b/src/file_ogg.c
@@ -82,12 +82,10 @@ static int data_check_ogg(const unsigned char *buffer, const unsigned int buffer
const unsigned int i=file_recovery->calculated_file_size - file_recovery->file_size + buffer_size/2;
if(memcmp(&buffer[i],ogg_header,sizeof(ogg_header))==0)
{
- unsigned int number_page_segments;
- unsigned int header_size;
+ const unsigned int number_page_segments=buffer[i+26];
+ const unsigned int header_size = number_page_segments + 27;
unsigned int page_size;
unsigned int j;
- number_page_segments=buffer[i+26];
- header_size = number_page_segments + 27;
page_size=header_size;
for(j=0;j<number_page_segments;j++)
page_size+=buffer[i+27+j];