From 6fa30f46bb5a43339929e97712685820b392331e Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 23 Mar 2013 19:21:24 +0100 Subject: [PATCH] src/file_gpg.c: turn off compilation warning --- src/file_gpg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/file_gpg.c b/src/file_gpg.c index 1bbca6c1..ba922688 100644 --- a/src/file_gpg.c +++ b/src/file_gpg.c @@ -307,7 +307,7 @@ static void file_check_gpg(file_recovery_t *file_recovery) buffer[i+5], buffer[i+6], buffer[i+7], buffer[i+8]); log_info(" data: [ %u bits]\n", be16(*mpi)); #endif - if(1+8+1+2+len > length) + if((unsigned)(1+8+1+2+len) > length) return ; if(buffer[i+1+8]==16 || buffer[i+1+8]==20) { @@ -323,7 +323,7 @@ static void file_check_gpg(file_recovery_t *file_recovery) #endif if(len2 <= 0) return ; - if(1+8+1+2+len+2+len2 > length) + if((unsigned)(1+8+1+2+len+2+len2) > length) return ; } } @@ -474,7 +474,7 @@ static int header_check_gpg(const unsigned char *buffer, const unsigned int buff buffer[i+5], buffer[i+6], buffer[i+7], buffer[i+8]); log_info(" data: [ %u bits]\n", be16(*mpi)); #endif - if(1+8+1+2+len > length) + if((unsigned)(1+8+1+2+len) > length) return 0; if((buffer[i+1+8]==16 || buffer[i+1+8]==20) && i+1+8+1+2+len+2 length) + if((unsigned)(1+8+1+2+len+2+len2) > length) return 0; } }